Computer Science, asked by romi5945, 11 months ago

What is loop and it's uses

Answers

Answered by asmivashishth1230
2

Answer:

The word loop is defined as “a structure, series, or process, the end of which is connected to the beginning”.

Normally, when we think of a loop, we picture something where the end merges with the beginning and there is continuity in its traversal. So in programming, loops are used for reiteration - for repetition of tasks. A sequence of instructions are put together in the loop and they’re repeatedly executed. The last instruction (end of the loop) is followed by the first instruction all over again (beginning of the loop) till you explicitly break out of it, or specify a condition to do so.

A for loop is one of the many popular loops in programming. It allows you to specify the initialization condition, the maintenance condition, and the termination condition.  

In computer science, a for-loop (or simply for loop) is a control flow statement for specifying iteration, which allows code to be executed repeatedly. ... For-loops are typically used when the number of iterations is known before entering the loop.

Explanation:

hope it helps

Similar questions