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
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
0
Answer:
Answer is (c)the program may crash or gives garbage data
Explanation:
Similar questions
English,
6 months ago
Physics,
6 months ago
English,
6 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago
English,
1 year ago