Pages

Tuesday, November 20, 2018

Array MCQs Set-2


C Programming - MCQs based on an Array Set-2

 

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 

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 

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

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

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

Check your ANSWER here...


For more details visit: C Program Practicals - Question Bank 

* * *



No comments:

Post a Comment