QuestionQ98Verified/Control Flow – Conditional Blocks and LoopsCopy linkReport a problemAsk AstroTutorSave questionHow many stars will the following code snippet print to the monitor? AThe snippet will enter an infinite loop.B2C0D1Show AnswerAnswerExplanationThe first loop iteration changes i from 4 to 2, prints one star, and then executes break because i == 2. A break exits the loop immediately and prevents the loop’s else clause from running.Show comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion