Explain the working of go to statement in C programming

04 b] Explain the working of go to statement in C programming.


goto is an unconditional branching statement


goto label;
forward jump
backward jump

➢ A label is a valid variable name.
➢ Label need not be declared and must be followed by a colon.
➢ Label should be used along with a statement to which control is transferred.
➢ Label can be anywhere in the program either before or after the goto label.
➢ Here control jumps to label skipping statement1 and statement2 without verifying any condition that is the reason we call it an unconditional jumping statement.


goto statement example

Leave a Reply

Your email address will not be published. Required fields are marked *