goto Statement:
void main()
- goto statement is used to transfer control from one location to another location.
- goto is a Keyword.
- Keywords are the reserved words.
- There are 32 keywords in C.
#include<conio.h>
void main()
{ /* Start of main() */
int a,c,d;
b=0; // Assign value zero to 'b'
clrscr();
printf("Enter the value of a/n ");
scanf(" %d , &a");
d=a ; // Assign value of 'a' to 'd'
BEGIN: c=a%10 // where BEGIN is a Lable
// % is a modulus operator. It is used for finding remainder value.
b=(b*10)+c;
a=a/10; // It is also written as a/=10
if(a>0)
goto BEGIN; // goto is a Keyword
printf(" Input Number=%d/n" , d);
printf(" Reversed Number=%d/n" , b)
} /* End of main() */
} /* End of main() */
Output:
Enter a number
1234
Input Number=1234
Reversed number=4321
Amazing experience on reading your article. It is really nice and informative.
ReplyDeletePython Training in Chennai
Python Classes in Chennai
JAVA Training in Chennai
Hadoop Training in Chennai
Selenium Training in Chennai
Python Training in Annanagar
Haloo pak^^
ReplyDeleteKami dari SENTANAPOKER ingin menawarkan pak^^
Untuk saat ini kami menerima Deposit Melalui Pulsa ya pak.
*untuk minimal deposit 10ribu
*untuk minimal Withdraw 25ribu
*untuk deposit pulsa kami menerima provider
-XL
-Telkomsel
untuk bonus yang kami miliki kami memiliki
*bonus cashback 0,5%
*bunus refferal 20%
*bonus gebiar bulanan (N-max,samsung Note 10+,Iphone xr 64G,camera go pro 7hero,Apple airpods 2 ,dan freechips)
Daftar Langsung Di:
SENTANAPOKER
Kontak Kami;
WA : +855 9647 76509
Line : SentanaPoker
Wechat : SentanaPokerLivechat Sentanapoker
Proses deposit dan withdraw tercepat bisa anda rasakan jika bermain di Sentanapoker. So… ? tunggu apa lagi ? Mari bergabung dengan kami. Pelayanan CS yang ramah dan Proffesional dan pastinya sangat aman juga bisa anda dapatkan di Sentanapoker.