C program to demonstrate the use of goto statement
kw.c
#include<stdio.h>intmain(){intn,a;printf("Enter a number ");scanf("%d",&n);if(n%2==0){gotoEVEN;}else{gotoODD;}EVEN:printf("%d is an EVEN number\n",n);return(0);ODD:printf("%d is an ODD number\n",n);return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
Enter a number 6
6 is an EVEN number
kodingwindow@kw:~$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the KodingWindow Android app. We intend to soon make it available on the Google Play Store. Currently, you need to install apk manually. Would you like to get the app? Minimum Requirement(s): Android 10