Computer Science, asked by PragyaTbia, 11 months ago

Whether while (i=20) {—} statement can be converted into an infinite loop? State whether the statement is True (or) False And Justify it

Answers

Answered by subuthdmri
3
true it may help you
Answered by lovingheart
0

The statement given in the question itself runs in a infinite loop only. There is no need to convert to make it run as a infinite loop. Normally, the while loop takes condition as an argument and the variable used in the argument gets incremented / decremented based on the need of the program.

But in the question, assignment operation has been performed instead of using a comparison or other logical operation to write a condition. So this assignment operation always returns “1 or true”. So the loop is always true, so it gets executed infinitely.

Similar questions