In a loop of C program, ________ statement immediately exits a loop, skipping…

2023

In a loop of C program, ________ statement immediately exits a loop, skipping the rest of the body of the loop.

Answer: D. breakIn C programming, loop control statements are used to alter the normal flow of loop execution. The 'break' statement immediately exits the loop, skipping the…

  1. A.

    if

  2. B.

    else

  3. C.

    continue

  4. D.

    break

  5. E.

    Question not attempted

Attempted by 1725 students.

Show answer & explanation

Correct answer: D

In C programming, loop control statements are used to alter the normal flow of loop execution. The 'break' statement immediately exits the loop, skipping the remaining body of the loop and transferring control to the statement following the loop. The 'continue' statement skips the current iteration and moves to the next iteration of the loop. The 'if' and 'else' statements are used for conditional execution and do not control loop flow. Therefore, the statement that immediately exits a loop is 'break'.

Explore the full course: Rssb Basic Computer Instructor

Loading lesson…