What will be the output of the program? #include<stdio.h> int X=40; int main() { int X=20; printf("%d ", X); return 0; }

Correct Answer: 20

Explanation:

Whenever there is conflict between a local variable and global variable, the local variable gets priority.

More Questions from Declarations and Initializations

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion