Object Oriented Programming05 marksException handling definition and purpose
Write a program to handle "array index out of range" exception.
Write a program to handle "array index out of range" exception. [5]
A raw array subscript in C++ is not checked. Writing numbers[10] on an array of five elements does not throw anything and does not report an error; it simply reads or writes memory that does not belong to the array, which is undefined behaviour. There is no equivalent of Java's ArrayIndexOutOfBou...