Computer Science, asked by mehtabali6930, 11 months ago

What happens if a C program tries to access a value from an array element whose subscript exceeds the size of array?Choose the correct option from the given options.
(a) The element will be set to 0.
(b) The compiler would report an error.
(c) The program may crash or gives garbage data.
(d) The array size increases automatically.

Answers

Answered by topwriters
0

(c) The program may crash or gives garbage data.

Explanation:

If a C program tries to access a value from an array element whose subscript exceeds the size of the array, then the program may crash or give out data that is invalid or incomprehensible.

Option C is the answer.

Answered by aryan12clasher
0

Answer:

Answer is (c)the program may crash or gives garbage data

Explanation:

Similar questions