Goto statement in C - tccicomputercoaching.com

Page 1

Goto statement in C - tccicomputercoaching.com Generally in Programming statements execute order wise. If developer don't want to follow the sequence then have to instruction to compiler to jump the particular statement in coding. Goto is used to jump to that particular statement in coding.

There are 2 type of Jump: 1. Backward Jump: Control goes back in coding from current statement. 2.Forward Jump: Control goes forward in coding from current statement. Syntax: goto lable; Example: This example represent both type of jump: #include<stdio.h> #include<conio.h> void main() { int a,c,x ; clrscr();


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.