1.

Briefly explain loop control statement.

Answer»

Program loop consists of two segments

(i) Body of the loop and

(ii) Control statement.

The test condition should be carefully stated in order to perform the desired number of loop execution. Test condition should transfer the control out of the loop as the condition false other wise control sets up an infinite loop. A looping process would include Setting & initialization of a counter, Execution of the statement in the loop, Test for the specified condition for execution of the loop and Updating the counter.

The C language provides three loop constructs for performing loop operation The While statement, The do-while statement and The for statement.



Discussion

No Comment Found