Computer Science, asked by shreya1216, 1 year ago

Explain the term for loop with an example???

Answers

Answered by ramarekha2005
1
In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached. Typically, a certain process is done, such as getting an item of data and changing it, and then some condition is checked such as whether a counter has reached a prescribed number. If it hasn't, the next instruction in the sequence is an instruction to return to the first instruction in the sequence and repeat the sequence. If the condition has been reached, the next instruction "falls through" to the next sequential instruction or branches outside the loop. A loop is a fundamental programming idea that is commonly used in writing programs.

For example--the FOR loop.
Answered by Shravanijaiswal
1
loops are the execution of block statement that are continued until the condition is satisfied.
In any C program we can use three types of loops
for loop
while loop
do while loop
Similar questions