Solved

Which of the Following Loops Executes Exactly 10 Times

Question 103

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