Q. Consider the following code snippet
while (a != 0)
{
if (spam>a == 1)
continue;
else
a++;
}
What will be the role of the continue keyword in the above code snippet?

  • (A) The continue keyword restarts the loop
  • (B) The continue keyword skips the next iteration
  • (C) The continue keyword skips the rest of the statements in that iteration
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) The continue keyword skips the rest of the statements in that iteration
Explanation: Instead of exiting a loop like the break keyword, the continue keyword moves to the next iteration from the place encountered.
Explanation by: Mr. Dubey
Instead of exiting a loop like the break keyword, the continue keyword moves to the next iteration from the place encountered.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
172
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
80%
Success Rate