Suppose v is an array with 100 int elements. If 100 is assigned to v[100], what happens? The compiler issues an error message. The compiler issues a warning message. An exception will be thrown when that statement is executed. Another variable or array will be unexpectedly modified.

2
Suppose v is an array with 100 int elements. If 100 is assigned to v[100], what happens?  The compiler issues an error message. The compiler issues a warning message. An exception will be thrown when that statement is executed. Another variable or array will be unexpectedly modified.

LANGUAGE: JAVA

CHALLENGE:

Suppose v is an array with 100 int elements. If 100 is assigned to v[100], what happens?

The compiler issues an error message.
The compiler issues a warning message.
An exception will be thrown when that statement is executed.
Another variable or array will be unexpectedly modified.

SOLUTION:

An exception will be thrown when that statement is executed

2 comments

Add comment