QuestionQ82

Controlling Program Flow

Given:

Question Image

What is the output?

  • A 3
  • B 2
  • C 5
  • D 4
Explanation

continue x transfers control to the next iteration of the labeled outer for loop, bypassing the remainder of the inner loop and its update expression. The additions and applicable inner-loop decrements leave c equal to 3. When a is 1, break exits the inner loop before any further addition occurs.

Community Discussion

No comments yet. Be the first to start the discussion!