Computer Science, asked by vinitiwari80, 11 months ago

if condition in a loop is false in the first step itself we get​

Answers

Answered by prakhargupta3301
40

Answer:

Depends on the loop.

Explanation:

If condition is false on first step,

For..., while loops will not execute anything.

Whereas do...while loops will execute once no matter what and exit.

Answered by AskewTronics
14

It can not execute the body of a loop in case of other loop but it executes the loop body one time in case of DO-While loop.

Explanation:

  • The loop is used to perform a single statement multiple times. The loop consists of some conditional statements to execute the loop body in a finite sequence of time. If the condition of the loop is false after processing some times then the execution of the loop body will terminate.
  • But if the loop is false in case of the first statement then it will never execute the loop body in case of while loop and for a loop because the first task of these loops is to check the condition.
  • But if there is a do-while loop then it executes the loop body in a single time because the last work of the loop is condition check in this loop.

Learn More:

  • While or do while loop: https://brainly.in/question/4838469
  • While or do while loop programs : https://brainly.in/question/2056930

Similar questions