Multiple choice technology programming languages

What is a loop ?

  1. A new type of Applet

  2. A segment of code to be run a specified amount of times

  3. A segment of code to be run infinite times

  4. A segment of code to be run once

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

A loop is a programming construct that repeatedly executes a block of code. Option B correctly describes it as code that runs a specified number of times. Option C is incorrect because most loops have termination conditions (they don't run infinitely unless specifically designed to do so). Option D is wrong because loops execute multiple times, not just once.