Solved

Which of the Following Loops Executes Exactly 10 Times

Question 127

Multiple Choice

Which of the following loops executes exactly 10 times?


A) for (int i = 0; i <= 10; i++) { }
B) int i = 0;
Boolean found = false;
Do
{
I++;
If (i % 10 == 0)
{
Found = true;
}
}
While (i < 10 && !found) ;
C) int i = 0;
While (i <= 10)
{
I++;
}
D) for (int i = 1; i <= 10; i++)

Correct Answer:

verifed

Verified

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

Related Questions