C Array - C programming (MCQ) questions for Q. 27504
Q. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?
- Published on 26 Feb 17a. The element will be set to 0.
b. The compiler would report an error.
c. The program may crash if some important data gets overwritten.
d. The array size would appropriately grow.
ANSWER: The program may crash if some important data gets overwritten.