Tagged: c keyword goto

The goto Keyword in C Language 16

goto statement in C Language

goto statement in C programming language is used for unconditional jump from one part of the program to another part of the program. It is always suggested not to use goto statement as this reduces the readability of the program. Using goto statement in C programming language is considered as poor programming approach. The goto statement consists of two parts: label and goto keyword. Example: /*use of goto statement*/ #include<stdio.h.> #include<conio.h> void main(){ int a; goto label; a = 10; printf(ā€œ%dā€, a); label: a = 20; printf(ā€œ%dā€, a); } Output: 20 When goto label is encountered, control goes to the...

FREE C Cheatsheet - Speed Up Your C Programming.

FREE C Cheatsheet - Speed Up Your C Programming.

Download a 7-page free cheat sheet for easy and quick access to C Concepts, Snippets, and Syntax.

Thank you! Check you inbox and access your cheat-sheet