Find output challenge #mysirg

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

Sir aapke videos se hi engineering pass ki hai
, Aapka channel or subscription deserve karta hai .

er.analysisfacts
Автор

Output is 2 because static variable doesn't change its value in entire course of program

bhupendrabhatt
Автор

Static varibale can chane only same function calling in a program

mridulamal
Автор

Good morning sir, sir where we can get these type of questions to improve our programming skills 😊

engineerpratik
Автор

Static mein to mere khyal se value change nhi hoti

Engineering_Unlocked
Автор

*Java*
public class Main {
static int x = 2;

public static void main(String[] args) {
System.out.println(x);

if (x-- > 0) {
main(args); // Call main() recursively with the args parameter
return;
}
}
}

sbb
Автор

I have doubt, ham always main ko call kar rhe hai and static int x=2; every time fresh create ho rhai hai to fir x kabhi zero kaise hoga.

ramtodkar
Автор

Sir please reply the correct answer with reason
*Ptr=NULL
Delete ptr

jxvlket
Автор

Why 2nd time x will print 1? 2nd time also It should print 2 only

hind