Computer Science, asked by arpatelzoya9504, 11 months ago

5) what will happen if in a c program you assign a value to an array element whose subscript exceeds the size of array?

Answers

Answered by lovingheart
0

The Program will crash. But this will not give any compiler error, since the compiler checks only for syntax, whether all the variables are declared, etc and does not worry about the inputs.

When we try to assign a value to array whose subscript goes beyond the size of the array, the program at run time will stop abruptly. There may even some loss of data too. But these depends on the version of the compiler.

Similar questions