0% found this document useful (0 votes)
41 views

Jump Statements: Goto Break Continue Exit

The document discusses different jump statements in C programming including goto(), continue(), exit(), break(), and labels. Goto() transfers control to any other statement within the same function, violating structured programming rules. Break() terminates a case in a switch statement or loop. Continue() skips the remaining statements in a loop body and proceeds to the next iteration. Exit() immediately terminates the entire program.

Uploaded by

murali420
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Jump Statements: Goto Break Continue Exit

The document discusses different jump statements in C programming including goto(), continue(), exit(), break(), and labels. Goto() transfers control to any other statement within the same function, violating structured programming rules. Break() terminates a case in a switch statement or loop. Continue() skips the remaining statements in a loop body and proceeds to the next iteration. Exit() immediately terminates the entire program.

Uploaded by

murali420
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 5

Jump Statements

goto() continue() exit()


To get more please visit: http://www.creativeworld9.blogspot.com

break()

Jump Statements (1)


label
The goto statement transfers control to any other statement within the same function in a C program.

It actually violates the rules of a strictly structured programming language.


They reduce program reliability and make program difficult to maintain.
To get more please visit: http://www.creativeworld9.blogspot.com

Jump Statements (2) statement


The break statement is used to terminate a case in a switch statement. It can also be used for abrupt termination of a loop. When the break statement is encountered in a loop, the loop is terminated immediately and control is passed to the statement following the loop.
To get more please visit: http://www.creativeworld9.blogspot.com

Jump Statements (3)


statement
The continue statement causes the next iteration of the enclosing loop to begin. When this statement is encountered, the remaining statements in the body of the loop are skipped and the control is passed on to the re-initialization step.
To get more please visit: http://www.creativeworld9.blogspot.com

Jump Statements (4) function


The exit() is used to break out of the program. The use of this function causes immediate termination of the program and control rests in the hands of the Operating System.

To get more please visit: http://www.creativeworld9.blogspot.com

You might also like