Computer Science, asked by anshul2455, 1 year ago

which loop is executed at least once in a program​

Answers

Answered by Anonymous
12

Explanation:

With a do while loop the condition is not evaluated until the end of the loop. Because of that a do while loop will always execute at least once. A for-loop always makes sure the condition is true before running the program.

Answered by StaceeLichtenstein
4

do-while loop is the correct answer to the given question.

Explanation:

  • The loop is used to execute one instruction many times until the condition is true in the loop.  There are mainly three kinds of loop.
  • The main objective of do-while loop at least once a time the task will be executed. So when we have to need to execute the task at least once then do-while will be used.  
  • it is also called the exit control loop because it test  the condition in the exit time.
  • Following are the syntax of do-while loop

do

{

//instruction and statement

increment/decrement of variable

}while(condition checking);

  • The while loop  and for loop is executed only when the condition is true .

Learn More :

  • https://brainly.in/question/15168360
Similar questions