Discussion :: Declarations and Initializations
-
What will be the output of the program?
#include
int main() { int X=40; { int X=20; printf("%d ", X); } printf("%d\n", X); return 0; }
Answer : Option B
Explanation :
In case of a conflict between a local variable and global variable, the local variable gets priority.
Be The First To Comment