Q. Consider the following code snippet.
What will be the role of the continue keyword in the above code snippet?

Code:
while (n != 0)
{
   if (n == 1) 
       continue;
   else 
       n++;
}
  • (A) The continue keyword breaks out of the loop
  • (B) The continue keyword restarts the loop
  • (C) The continue keyword skips the next iteration
  • (D) The continue keyword skips the rest of the statements in that iteration
πŸ’¬ Discuss
βœ… Correct Answer: (D) The continue keyword skips the rest of the statements in that iteration

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
220
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Manisha Agrawal
Publisher
πŸ“ˆ
84%
Success Rate