Question 1 of 25
Hints left: 3
Q1
What is the scope of an automatic variable?
Q2
What will be the output of the following C code? #include <stdio.h> int m() { printf("hello"); } void main() { int k = m(); printf("%d", k); }
Q3
What will be the output of the following C code? #include <stdio.h> int main() { register auto int i = 10; i = 11; printf("%d\n", i); }
Q4
What will be the output of the following C code? #include <stdio.h> void main() { m(); } void m() { printf("hi"); m(); }
Q5
Which among the following is the correct syntax to declare a static variable register?
Q6
What will be the output of the following C code? #include <stdio.h> #define foo(x, y) x / y + x int main() { int i = -6, j = 3; printf("%d\n",foo(i + j, 3)); return 0; }
Q7
Can function definition be present in header files?
Q8
In a conditional inclusion, if the condition that comes after the if is true, then what will happen during compilation?
Q9
What is the sequence for preprocessor to look for the file within <>?
Q10
What will be the output of the following C code? #include <stdio.h> void main() { register int x; printf("%d", x); }
Q11
What will be the output of the following C code? #include <stdio.h> #define MIN 0 #if MIN #define MAX 10 #endif int main() { printf("%d %d\n", MAX, MIN); return 0; }
Q12
C preprocessors can have compiler specific features.
Q13
Which part of the program address space is p stored in the following C code? #include <stdio.h> int *p; int main() { int i = 0; p = &i; return 0; }
Q14
What is a preprocessor?
Q15
What will be the output of the following C code? #include <stdio.h> void main() { #define max 37 printf("%d", max); }
Q16
Which of the following is a storage specifier?
Q17
When compiler accepts the request to use the variable as a register?
Q18
The below two lines are equivalent to . . . . . . . . #define C_IO_HEADER <stdio.h> #include C_IO_HEADER
Q19
What is the return-type of the function sqrt()?
Q20
What is the scope of an external variable?
Q21
Which of the following is an external variable in the following C code? #include <stdio.h> int func (int a) { int b; return b; } int main() { int c; func (c); } int d;
Q22
What will be the output of the following C code? #include <stdio.h> void foo(); int main() { void foo(int); foo(1); return 0; } void foo(int i) { printf("2 "); }
Q23
What will be the output of the following C code? #include <stdio.h> void main() { register int x = 0; if (x < 2) { x++; main(); } }
Q24
What will be the output of the following C code? #include <stdio.h> void f(); int main() { #define foo(x, y) x / y + x f(); } void f() { printf("%d\n", foo(-3, 3)); }
Q25
Which of the following properties of #define is not true?