Podcast
Questions and Answers
What happens when an array subscript exceeds the size of the array in C?
What happens when an array subscript exceeds the size of the array in C?
- The data is removed from memory
- The data is placed outside the array (correct)
- The program crashes
- The user is warned
In C, does exceeding the size of an array during run time initialization result in a compile-time error?
In C, does exceeding the size of an array during run time initialization result in a compile-time error?
- It depends on the compiler
- No (correct)
- Yes
- Only for certain data types
What can happen if data is placed outside the array in C?
What can happen if data is placed outside the array in C?
- The program will terminate
- The data will be lost
- The program will continue to execute normally (correct)
- The program will display an error message