Loops

  1. Which keyword is used to exit a loop?
    1. goto
    2. exit
    3. break
    4. continue
  1. View Hint | View Answer | Workspace | Discuss In Forum | Report

    exit will terminate the program execution, goto is used to jump to another statement, continue is used to skip the immediate statement and start from the beginning.

    Correct Option: C

    break keyword is used to break from the loop.
    exit will terminate the program execution, goto is used to jump to another statement, continue is used to skip the immediate statement and start from the beginning.

    Report