Question 1 of 25
Hints left: 3
Q1
The #else directive is used for . . . . . . . .
Q2
What will be the output of the following C code having void return-type function? #include <stdio.h> void foo() { return 1; } void main() { int x = 0; x = foo(); printf("%d", x); }
Q3
What will be the output of the following C code? #include <stdio.h> void main() { static int x; if (x++ < 2) main(); }
Q4
What will be the output of the following C code? #include <stdio.h> int x; void main() { m(); printf("%d", x); } void m() { x = 4; }
Q5
What is the scope of an automatic variable?
Q6
Comment on the output of the following C code. #include <stdio.h> #define var 20); int main() { printf("%d\n", var }
Q7
register keyword mandates compiler to place it in machine register.
Q8
Which of the following storage class supports char data type?
Q9
What will be the output of the following C code? #include <stdio.h> int foo(); int main() { int i = foo(); } foo() { printf("2 "); return 2; }
Q10
What will be the output of the following C code? #include <stdio.h> #define SYSTEM 20 int main() { int a = 20; #if SYSTEM == a printf("HELLO "); #endif #if SYSTEM == 20 printf("WORLD\n"); #endif }
Q11
Functions can return enumeration constants in C?
Q12
What will be the output of the following C code? #include <stdio.h> #define MIN 0 #if defined(MIN) + defined(MAX) #define MAX 10 #endif int main() { printf("%d %d\n", MAX, MIN); return 0; }
Q13
What will be the output of the following C code? #include <stdio.h> int foo(int, int); #define foo(x, y) x / y + x int main() { int i = -6, j = 3; printf("%d ",foo(i + j, 3)); #undef foo printf("%d\n",foo(i + j, 3)); } int foo(int x, int y) { return x / y + x; }
Q14
Conditional inclusion can be used for . . . . . . . .
Q15
What will be the output of the following C code? #include <stdio.h> void foo(auto int i); int main() { foo(10); } void foo(auto int i) { printf("%d\n", i ); }
Q16
Automatic variables are initialized to . . . . . . . .
Q17
What will be the output of the following C code? #include <stdio.h> void foo(); int main() { void foo(); foo(); return 0; } void foo() { printf("2 "); }
Q18
What will be the output of the following C code? #include <stdio.h> void main() { { int x = 8; } printf("%d", x); }
Q19
What will be the output of the following C code? #include <stdio.h> int *m(); void main() { int k = m(); printf("%d", k); } int *m() { int a[2] = {5, 8}; return a; }
Q20
Functions have static qualifier for its declaration by default.
Q21
Global variables are . . . . . . . .
Q22
Can we use a function as a parameter of another function? [Eg: void wow(int func())].
Q23
Assignment statements assigning value to local static variables are executed only once.
Q24
Which of following is not accepted in C?
Q25
If the file name is enclosed in double quotation marks, then . . . . . . . .