All challenges
Multiple ChoiceBeginner 30s

while vs do-while

Choose the best answer for: loop execution guarantee
Options
  1. 1A while loop always runs its body once
  2. 2do-while executes the body at least once
  3. 3while and do-while behave identically
  4. 4A do-while never runs when the test is false

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle