Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C Programming
»
Declarations and Initializations
What will be the output of the program? #include<stdio.h> int X=40; int main() { int X=20; printf("%d\n", X); return 0; }
20
40
Error
No Output
Show Answer
Correct Answer:
20
Explanation:
Whenever there is conflict between a local variable and global variable, the local variable gets priority.
← Previous
Next →
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment