What is the difference between accessing an out-of-bounds (negative, or otherwise inaccessible) index in a compiled programming language (such as C) versus an interpreted language (such as MATLAB)?
As per the recommendation of this site, I have researched a number of threads concerning the accessing of out-of-bounds indices. Most of these threads, however, only focus on resolving an issue with source. That said, I have was able to garner from this site that accessing an out-of-bounds index while using C results in undefined behavior. Through experimentation using MATLAB, it is my guess that interpreted languages perform tests to determine if an index should be inaccessible and "catch" poorly-written code before out-of-bounds indexes are accessed. Is this actually the case with interpreted languages in general, or do they, similar to the C (compiled) language, cause a level of undefined behavior to occur? Does the accessing of an out-of-bounds index within the program of any compiled language cause undefined behavior?