Computer Science, asked by amitaggarawal5695, 9 months ago

Define while loops. (NCERT Class 11th)

Answers

Answered by NehaKari
0

The LOOP which can make a program REPEAT either a specified number of times or until a particular condition is satisfied is called WHILE LOOP.

In C program repetitive operation is done through a loop control instruction and hence there are three types of LOOP CONTROL METHOD among which WHILE LOOP is best known for repetation of a program upto particular time.

The statements within the while loop would keep getting executed till the condition being tested remain true. When the condition becomes FALSE,the control passes to the first statement that follows the body of the WHILE LOOP.

The condition being tested may use relational or logical operators.

The statement within the loop may consist a single line or a block of statements.

The WHILE must test a CONDITION that will eventually become FALSE,otherwise the LOOP would keep getting executed forever, indefinitely.

Further there are symbols where INCREMENT and DECREMENT can be indicated in while loop.

Answered by Raghav1330
0

While loops are defined below :

- According to computer science when a particular area of code is repeated multiple times to get the specific and required result then in these conditions while loop is used to perform such functions.

- In another words it's considered to be a control flow statement which permits the code to be carried out or either it's executed repeatedly on the basis of the particular Boolean expression.

Similar questions