Recent questions tagged extern-variable

6 6 votes
2 2 answers
201
201 views
What will happen when the following code is compiled?#include <stdio.h int x = 5; int main() { extern int x; int x = 10; printf("%d", x); return 0; }$\texttt{5}$ $\texttt...
7 7 votes
2 2 answers
217
217 views
What is the output of the following code?#include <stdio.h int x = 10; int main() { int x = 20; { extern int x; printf("%d", x); } return 0; }$\texttt{10}$ $\texttt{20}$ ...
5 5 votes
3 3 answers
230
230 views
What will happen when the following code is compiled and linked?#include <stdio.h int main() { extern int a; printf("%d", a); return 0; }$\texttt{0}$ Garbage value Compil...
6 6 votes
2 2 answers
219
219 views
What is the output of the following code?#include <stdio.h int main() { extern int i; printf("%d", i); return 0; } int i = 100;Garbage value $\texttt{0}$ $\texttt{100}$ C...
1 1 vote
2 answers 2 answers
1.4k
1.4k views
#include <stdio.h int i =20; int main() { int i = 10; extern int i; printf("%d",i); }Why does this program give Compiler error??please explain
0 0 votes
1 answers 1 answer
2.3k
2.3k views
1 1 vote
0 0 answers
1.2k
1.2k views
3 3 votes
2 answers 2 answers
2.8k
2.8k views
extern int i; int i = 10; i = 5; int main() { printf("%d", i); return 0; }The output for the above code is _______
7 7 votes
2 2 answers
2.0k
2.0k views
extern int i;int i=5;i=10;int main(){ printf("\ni=%d",i); return 0;}output is?
3 3 votes
1 1 answer
1.5k
1.5k views
#include <stdio.h int main() { int a=10; extern int a; return 0;} Why this gives compilation error? Extern is just a declaration.So why it is giving error on c...
3 3 votes
1 1 answer
3.3k
3.3k views
extern int var;int main(void){ var = 10; // why it is not considered as definition in prog return 0;}Why this is creating error saying (var is not defined).But as per ...
To see more, click for the full list of questions or popular tags.