". VdoTips: C FUNDAMENTAL MCQ 13

APPLY LATEST GOVT JOBS

hi

C FUNDAMENTAL MCQ 13

Q.51 If an integer occupies 4 bytes and a character occupies 1 bytes of memory, each element of the following structure would occupy how many bytes? struct name { int age; char name [20]; } (A) 5
(B) 24
(C) 21
(D) 22


Q.52 If an array is used as function argument, the array is passed
(A) by value.
(B) by reference
(C) by name.
(D) the array cannot be used as a function argument.


Q.53 To access a structure element using a pointer, ___________ operator is used
(A) dot (.)
(B) pointer (&)
(C) pointer (*)
(D) arrow (→)


Q.54 The library function sqrt( ) operates on a double precision argument. If, i is an integer variable, which one of the following calls would correctly compute sqrt(i)? (A) sqrt((double)i)
(B) (double) sqrt(i)
(C) (double) (sqrt(i))
(D) sqrt(i)


Q.55 What will happen if the following loop is executed? int num = 0; do { --num; printf(“%d”, num); num++; }while (num >= 0); }
(A) The loop will run infinite number of times.
(B) The program will not enter the loop.
(C) There will be a compilation error.
(D) There will be runtime error.