". VdoTips: C FUNDAMENTAL MCQ 12

APPLY LATEST GOVT JOBS

hi

C FUNDAMENTAL MCQ 12

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


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


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


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


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