What is/are the correct restriction(s) on GOTO statement?

56. What is/are the correct restriction(s) on GOTO statement?

  1. A LOOP statement or sub-block cannot be used as an IF statement, CASE statement, or LOOP statement.
  2. A CASE statement WHEN clause or an IF statement clause cannot transfer control to another.
  3. No control can be transferred between outer blocks and sub-blocks.
  4. All of the above

Answer: D) All of the above

Explanation:

The restrictions on the GOTO statement are –

  1. A LOOP statement or sub-block cannot be used as an IF statement, CASE statement, or LOOP statement.
  2. A CASE statement WHEN clause or an IF statement clause cannot transfer control to another.
  3. No control can be transferred between outer blocks and sub-blocks.
  4. A subprogram cannot be controlled by a parent program.
  5. An exception handler cannot take control.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.