Loop Control Structure – NFE

Which of the following loops executes at least once?

 
 
 
 

Which of the following statements is used to skip an iteration of a loop?

 
 
 
 

Which keyword is used to exit a loop immediately?

 
 
 
 

What is the output of the following code?

int i = 1;
do
{
printf(“%d “, i);
i++;
} while(i <= 3);

 
 
 
 

Which of the following loops does not necessarily require a loop variable?

 
 
 
 

Which of the following loops is best when the number of iterations is known?

 
 
 
 

Which loop checks the condition after executing the loop body?

 
 
 
 

What will be the output of the following code?

int i = 5;
while(i > 0)
{
printf(“%d “, i);
i–;
}

 
 
 
 

How many times will the following loop execute?

for(int i = 0; i < 5; i++)
{
printf(“Hello\n”);
}

 
 
 
 

What will be the output of the following loop?

int i = 1;
while(i <= 3)
{
printf(“%d “, i);
i++;
}

 
 
 
 

Question 1 of 10