GOTO Elimination Algorithm

GOTO Elimination Algorithm

Following is an excerpt from the full-length article which is hosted on DZone here:

Problem Description

Devise an algorithm to eliminate any GOTO statements from a program in order to get a structured program, which is logically and functionally equivalent

For example:

No alt text provided for this image

Goto Branching Cases

The following are the different abstract cases that may arise in programs that contain GOTO branching:

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

To learn more and resume reading, I invite you to read my full-length article here:


To view or add a comment, sign in

More articles by Robin Rizvi

Explore content categories