Warning: implode(): Invalid arguments passed in /www/wwwroot/jobquiz.info/mdiscuss.php on line 336 What is the output of the program? #include<stdio.h> int main() { extern int a; printf("%d\n", a); return 0; } int a=20; ?->(Show Answer!)
1. What is the output of the program? #include<stdio.h> int main() { extern int a; printf("%d\n", a); return 0; } int a=20;
Ask Your Doubts Here
Comments
By: guest on 01 Jun 2017 06.01 pm
extern int a; indicates that the variable a is defined elsewhere, usually in a separate source code module. printf("%d\n", a); it prints the value of local variable int a = 20. Because, whenever there is a conflict between local variable and global variable, local variable gets the highest priority. So it prints 20.