Solved

What Is the Result of Executing This Code Snippet

Question 23

Multiple Choice

What is the result of executing this code snippet?
Int[] marks = { 90, 45, 67 };
For (int i = 0; i <= 3; i++)
{
System.out.println(marks[i]) ;
}


A) The code snippet does not give any output.
B) The code snippet displays all the marks stored in the array without any redundancy.
C) The code snippet causes a bounds error.
D) The code snippet executes an infinite loop.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions