Q.16 main() {
long i = 30000;
printf(“%d”, i); }
the output is

(A) 3000 (B) 30000
(C) 0 (D) -1
Ans:B

Q.17 The directive that can be used to test whether an expression evaluates to a nonzero value or not
is

(A) #if (B) #elif
(C) #endif (D) #exit
Ans:A

Q.18 main() {
printf(“%p\n”, main());
}

(A) Prints the address of main function.
(B) Prints 0.
(C) Is an error.
(D) Is an infinite loop.
Ans:A

Q.19 The << operator is used for
(A) Right shifting (B) Left shifting
(C) Bitwise shifting (D) Bitwise complement
Ans:B

Q.20 The C language includes the header file standard input & output in
(A) stdlib.h library (B) stdio.h library
(C) conio.h library (D) #include library
Ans:B

Q.21 The value that follows the keyword CASE may only be
(A) constants (B) variable
(C) number (D) semicolon
Ans:A

Q.22 The statement which is used to terminate the control from the loop is
(A) break (B) continue
(C) goto (D) exit
Ans:A

Q.23 The machine registers are sometimes called
(A) local variables (B) global variables
(C) accumulators (D) static variables
Ans:A

Q.24 Set of values of the same type, which have a single name followed by an index is called
(A) function (B) structure
(C) array (D) union
Ans:C

Q.25 An array of pointers is same as
(A) pointer to array (B) pointers to pointers
(C) pointer to function (D) pointer to structure
Ans:B

Q.26 What is the output of the following program segment?
main()
{
long i = 65536;
printf(“%d\n”, i);
}

(A) 0 (B) 65536
(C) -1 (D) 65
Ans:A

Q.27 What is the output of the following program segment?
main()
{
int i = 1;
do
{ printf(“%d..”, i);
} while(i--);
}

(A) 0..1.. (B) 1..0..
(C) 0 (D) -1
Ans:B

Q.28 What is the output of the following program segment?
main()
{
int i = ++2;
printf(“%d\n”, i);
}

(A) 3 (B) 2
(C) 0 (D) -1
Ans:A

It is a compilation error. However if we write “i=2; ++i;” then value of i is printed as 3.

Q.29 The name of all functions end with a
(A) pair of parenthesis (B) semicolon
(C) braces (D) colon
Ans:A

Q.30 A float variable can store any variable within the range of
^ = raised to
(A) -1.7 ×10^38 to  1.7 ×10^38 (B)  - 3.4 ×10^38 to 3.4 ×10^38
(C) - 7.2 ×10^38 to 7.2 ×10^38 (D)  -1.2^38 ×10 to  1.2 ×10^38
Ans:B