Fundamentals of Data Structure MCQ's Set-2
1] What is the difference between the following 2 codes?
b) No difference as space doesn’t make any difference, values of a, b, d are different
c) Program 1 has syntax error, program 2 is not
d) Program 2 has syntax error, program 1 is not
ANSWER : A
2] What is the output of this C code?
ANSWER : B
3] What is the output of this C code?
ANSWER : A
4] For which of the following, “PI++;” code will fail?
a) #define PI 3.14
b) char *PI = “A”;
c) float PI = 3.14;
d) Both (A) and (B)
ANSWER : A
5] What is the output of this C code?
ANSWER : C
6] What is the output of this C code?
ANSWER : A
7] What is the output of this C code?
ANSWER : A
8] Comment on the output of this C code?
b) ++ operator may return value with or without side effects
c) it can be evaluated as (i++)+i or i+(++i)
d) Both a and b
ANSWER : A
9] #include is also called as ______
a) Preprocessor directive
b) Inclusion directive
c) File inclusion directive
d) None of the mentioned
ANSWER : A
10] C preprocessors can have compiler specific features.
a) true
b) false
c) Depends on the standard
d) Depends on the platform
ANSWER : A
11] C preprocessor is conceptually the first step during compilation
a) true
b) false
c) Depends on the compiler
d) Depends on the standard
ANSWER : A
12] Preprocessor feature that supply line numbers and filenames to compiler is called?
a) Selective inclusion
b) macro substitution
c) Concatenation
d) Line control
ANSWER : D
13] A preprocessor is a program
a) That processes its input data to produce output that is used as input to another program
b) That is nothing but a loader
c) That links various source files
d) All of the mentioned
ANSWER : A
14] The sequence of allocation and deletion of variables for the following code is.
ANSWER : B
15] What is the output of this C code?
ANSWER : A
16] What is the output of this C code?
ANSWER : D
17] What is the output of this C code?
ANSWER : B
18] What is the output of this C code?
ANSWER : C
19] What is the output of this C code?
ANSWER : D
20] What is the output of this C code?
ANSWER : A