93.5k views
2 votes
What is a nested loop?

(a) A loop that controls a Nest thermostat
(b) A loop that exists inside the body of another loop
(c) A loop that controls the program like the main game loop
(d) It's another term for an infinite loop

User Crowjonah
by
8.7k points

1 Answer

4 votes

Final answer:

A nested loop is a loop that exists inside the body of another loop. It allows you to perform more complex operations by combining multiple loops.

Step-by-step explanation:

A nested loop is a loop that exists inside the body of another loop. In programming, it is common to use nested loops when you need to perform a repetitive task multiple times. The inner loop will execute its statements repeatedly for each iteration of the outer loop. This allows you to perform more complex operations by combining multiple loops.

User Raymond Chen
by
8.4k points