Q: Which type of error occurs when a program attempts to access an array element beyond its boundaries?
-
A
Logical Error
-
B
Compilation Error
-
C
Array Error
-
D
Runtime Error
D
Answer:
D
Explanation:
Accessing an array element beyond its boundaries can lead to a runtime error, often referred to as an "array out-of-bounds" error. This situation can result in unpredictable behavior and memory-related issues.
Related Topic:
Share Above MCQ