Accessing an Out of Bound Index

Learn what happens if we access an out of bound index in an array.

C program does not generate a subscript out of range error

In C programs, if the programmer accidentally accesses an index of an array that is out of bound, the compiler does not report a subscript out of range error. The program may, however, generate unpredictable results.

See the code given below!

Get hands-on with 1200+ tech skills courses.