go to in c programming
BM Balmiki Mandal 21 Aug 2022 1 views 0 comments C Programming

go to in c programming

Go-to control statements:  

go-to control statement is an unconditional Non-iterative control statement. go to also call as local go to

syntax: Two points we need to take care

  1. set a lebel (label name: )
  2. called a lebel;(go to label name; )

     Note:

  • should not be a constant
  • should not be a keyword

Two Types of go-to statements

  1. forward go to
  2. backward go to

 

Forward go to : if first calling the label after that  setting the  label is called forward Go to


 

program: 

#include
void main()
{
printf("hello...\n");
L1:sleep(1);
printf("Hai....\n")
go to L1;
}

Attension: 

Backward go to label: if  first setting label after that you call the label in called backward label

syntax:

 program

#include
void main()
{
printf("hello...\n");
go to L1;
sleep(1);
printf("Hai....\n")
L1:
printf("bye...\n")
}

some programs on go to statements

  1. write a program to display the multiplication table of a given number using a go to 
  2. write a program to print the binary format using a go to 

0 Comments

No comments yet, Be the first to comment.

Post a Comment

Please sign in to post a comment.

Related Posts

Bit wise operators Assignment

Bitwise Operators practical assignment: Take runtime input, bit-level manipulation, and different data units r...

AG Anvesh G 27 Sep 2026
Understanding Float and Double Binary Representation in C

Understanding Float and Double Binary Representation in CIntroduction:When we store decimal numbers such as 10...

AG Anvesh G 31 May 2026
Topic-wise C Programming Interview Questions

C Programming Interview Questions – Topic Wise1. IntroductionC programming is one of the most important langu...

AG Anvesh G 30 May 2026