Q.31 scanf() can be used for reading
(A) double character (B) single character
(C) multiple characters (D) no character
Ans:C

Q.32 ‘C’ allows a three-way transfer of control with the help of
(A) unary operator (B) relational operator
(C) ternary operator (D) comparison operator
Ans:C

Q.33 The statement that transfers control to the beginning of the loop is called
(A) break statement (B) exit statement
(C) continue statement (D) goto statement
Ans:C

Q.34 A variable which is visible only in the function in which it is defined, is called
(A) static variable (B) auto variable
(C) external variable (D) local variable
Ans:D

Q.35 The number of arguments supplied from the command line, by convention, is known as
(A) arg c (B) arg v
(C) #define (D) #include
Ans:A

Q.36 Output of the program given below is
int i;
main()
{
printf(“%d”, i);
}

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

Q.37 What will be the output of the following program?
main()
{
char *p = “ayqm”;
printf (“%c”, ++*(p++));}

(A) b (B) z
(C) q (D) n
Ans:A

Q.38 What will be the output of the following program?
main()
{
int i = 5;
printf(“%d”, i=++i==6);
}

(A) 0 (B) 1
(C) 7 (D) 6
Ans:B

Q.39 Determine which of the following is a valid character constant
(A) ‘\\’ (B) ‘\0’
(C) ‘xyz’ (D) ‘\052’
Ans:A

Q.40 The maximum value that an integer constant can have is
(A) .32767 (B) 32767
(C) 1.7014e+38 (D) –1.7014e+38
Ans:B

Q.41 The expression X=4+2%-8 evaluates
(A) –6 (B) 6
(C) 4 (D) None
Ans:B

Q.42 What will be the output of following program?
main()
{
int x=15;
printf(“\n%d%d%d”, x!=15, x=20, x<30);
}

(A) 0, 20, 1 (B) 15, 20, 30
(C) 0, 0, 0 (D) Error
Ans:A

Q.43 How many times the following program would print (“abc”)?
main()
{
printf(“\nabc”);
main();
}

(A) Infinite number of times (B) 32767 times
(C) 65535 times (D) Till the stack does not overflow
Ans:A

Q.44 What would be output of the following program?
# define SQR(X) (X*X)
main()
{
int a, b=3;
a = SQR(b+2);
printf(“\n%d”, a);
}

(A) 25 (B) 11
(C) Error (D) Garbage value
Ans:B

Q.45 What would be output of the following program?
#include "stdio.h"
main()
{
printf(“%d%d”, size of (NULL!), size of (“ “));
}

(A) 2 1 (B) 1 2
(C) 2 2 (D) 1 1
Ans:C