Question 1 of 25
Hints left: 3
Q1
Register variables reside in . . . . . . . .
Q2
What will be the output of the following C code (without linking the source file in which ary1 is defined)? #include <stdio.h> int main() { extern ary1[]; printf("scope rules\n"); }
Q3
What is #include directive?
Q4
Property of the external variable to be accessed by any source file is called by the C90 standard as . . . . . . . .
Q5
What is #include <stdio.h>?
Q6
What will be the output of the following C code? #include <stdio.h> int x = 5; void main() { int x = 3; m(); printf("%d", x); } void m() { x = 8; n(); } void n() { printf("%d", x); }
Q7
What will be the output of the following C code? #include <stdio.h> static int x; void main() { int x; printf("x is %d", x); }
Q8
Automatic variables are stored in . . . . . . . .
Q9
Automatic variables are . . . . . . . .
Q10
What will be the output of the following C code? #include <stdio.h> int main() { printf("%d", d++); } int d = 10;
Q11
What will be the x in the following C code? #include <stdio.h> void main() { int x; }
Q12
Which of the following names for files not accepted?
Q13
Comment on the output of the following C code. #include <stdio.h> #include "test.h" #include "test.h" int main() { //some code }
Q14
What will be the output of the following C code? #include <stdio.h> int *m(); void main() { int *k = m(); printf("hello "); printf("%d", k[0]); } int *m() { int a[2] = {5, 8}; return a; }
Q15
What will be the output of the following C code? #include <stdio.h> int main() { void foo(), f(); f(); } void foo() { printf("2 "); } void f() { printf("1 "); foo(); }
Q16
What linkage does automatic variables have?
Q17
Which of the following is a correct format for declaration of function?
Q18
If #include is used with file name in angular brackets.
Q19
The value obtained in the function is given back to main by using . . . . . . . . keyword.
Q20
If storage class is not specified for a local variable, then the default class will be auto.
Q21
For each #if, #ifdef, and #ifndef directive.
Q22
Automatic variables are allocated space in the form of a . . . . . . . .
Q23
What will be the output of the following C code? #include <stdio.h> int main() { void foo(); printf("1 "); foo(); } void foo() { printf("2 "); }
Q24
What will be the output of the following C code? #include <stdio.h> int main() { auto i = 10; const auto int *p = &i; printf("%d\n", i); }
Q25
What will be the output of the following C code? #include <stdio.h> void main() { m(); void m() { printf("hi"); } }