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