Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
C
→
Dynamic Memory Allocation in C
→
#include <stdio.h>extern int var;int main(){...
1.
#include <stdio.h>extern int var;int main(){var = 10;printf("%d ", var);return 0;}(A) Compiler Error: var is not defined(B) 20(C) 0
Answer»
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
int main(){int x = 032;printf("%d", x);return 0;}(A) 32(B) 0(C) 26(D) 50
#include <stdio.h>extern int var;int main(){var = 10;printf("%d ", var);return 0;}(A) Compiler Error: var is not defined(B) 20(C) 0
Consider the following C program, which variable has the longest scope?int a;int main(){int b;// ..// ..}int c;(A) a(B) b(C) c(D) All have same scope
Predict the output#include <stdio.h>int var = 20;int main(){int var = var;printf("%d ", var);return 0;}(A) Garbage Value(B) 20(C) Compiler Error
#include <stdio.h>extern int var = 0;int main(){var = 10;printf("%d ", var);return 0;}(A) 10(B) Compiler Error: var is not defined(C) 0
Consider the following two C linesint var1;extern int var2;Which of the following statements is correct(A) Both statements only declare variables, don’t define them.(B) First statement declares and defines var1, but second statement only declares var2(C) Both statements declare define variables var1 and var2
Output?int main(){{int var = 10;}{printf("%d", var);}return 0;}(A) 10(B) Compiler Error(C) Garbage Value
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies