Wednesday, November 28, 2018

Array MCQs Set-2 Answer


C Programming - MCQs based on an Array Set-2 Answer


For declaration int number[10]; suppose the starting address of number[0] is 2202 and the size of int is 4 bytes in the system; then, the address of number[1] will be ______.
A. 2206
B. 2204
C. 2203
D. none of these
ANSWER: A

For declaration char fname[15]; suppose the starting address of fname[0] is 1200. Then, the address of fname[1] will be ______.
A. 1204
B. 1202
C. 1201
D. none of these
ANSWER: C

Array can be initialized at ____________ .
A. declaration time
B. runtime
C. declaration and runtime
D. none of these
ANSWER: C

Which of the following is correct definition of one dimensional array declaration?
A. data_type array_name[arraysize];
B. array_name data_type[arraysize];
C. data_type arraysize[array_name];
D. none of these
ANSWER: A

Which of the following is correct syntax of one dimensional array declaration?
A. int array1[10];
B. array1 int[10];
C. int 10[array1];
D. none of these
ANSWER: A


No comments:

Post a Comment