Std 10th Ch 15 Arrays
Std 10th Ch 15 Arrays
15 Arrays
1. What happens if a C program tries to access a value from an array element whose subscript
exceeds the size of array?
a) Element will be set to zero
b) The compiler would report an error
c) The program may crash or gives garbage data
d) The array size increase automatically
2. What will be the output of following program segment?
Int num[5] = {1,2,3,4,5};
Int i, j;
i = num[1];
j = num[2];
printf(“%d, %d, %d”, I, j, num[0]);