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!





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.