Solved

What Is the Result of Executing This Code Snippet

Question 7

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents