English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

a) Logical error
b) Syntax error
c) Procedural abstraction error
d) Run-time error

2006-08-29 10:29:37 · 3 answers · asked by dodido 3 in Computers & Internet Programming & Design

k, the entire question goes like this:
In programming, what type of error occurs when a user tries to access a non-existent/undefined array element, thus crashing the computer?

2006-08-29 16:09:42 · update #1

3 answers

As everyone is telling you this is language dependant.
Also you are only accessing/reading the array element.
So what is the data type of the Array elements?

If I have an array of 5 elements, Integers, and I access the 10th element I am accessing an unknown piece of memory. As this is an integer, unless the language is going to spot that I out of bounds the integer type will allow me to process any value that it finds in the memory location, which should be 10 Integer positions from the starting location of the Array.

An array out of bounds error should not crash the computer. It may crash the program in which the error occurs.

2006-08-29 12:39:23 · answer #1 · answered by AnalProgrammer 7 · 0 0

This not only depends on the language but quirks of the compiler and what system the binary's run on.

2006-08-29 19:13:55 · answer #2 · answered by knieveltech 3 · 0 0

depends on the language, but usually D - a run time error.

2006-08-29 17:49:10 · answer #3 · answered by John J 6 · 0 0

fedest.com, questions and answers