Explain the goto statement - computer programming, Programming Languages

Assignment Help:

Explain the Goto Statement - Computer Programming?

The goto statement is employed to alter the normal sequence of program execution by transferring control to some other part of the program. It can be written like

goto label1;

...............

...............

label1: ...............

Where label is an identifier specifically uses to locate target statement to which control is transferred the label must be in the same function as the goto statement that uses it. You can't jump between functions and the lable must be followed by a colon, label can occur before or after goto and no two statements can have the same label.

For illustration: To print the numbers up to 100 using goto statement.

x=0;

loop :

printf("Value of x = %d\n",x);

x++;

if (x<=100) goto loop;


Related Discussions:- Explain the goto statement - computer programming

Program for implement xslt, The aim of this task is to gain experience in u...

The aim of this task is to gain experience in using the popular Web languages XSLT, XQuery, DTD, XML Schema and RDF. The Content: The University is organizing a stage show wh

Need help for crowdsporting website development, CrowdSporting Website Deve...

CrowdSporting Website Development I want an advanced web developer to spend 1-2 days coding our newly designed website. It will be a single page scrolling site, fully designed a

Fileless document and encryption(stegnography), code for using tree view co...

code for using tree view control and fill it with database

Program to present main frame contains of button, The program presents main...

The program presents mainframe contains two button new user, existing user PART ONE: CLICKING ON NEW USER New window appear contains: text field represent username,

Kinect help, My kinect hand cursor only works for main menu but when it go...

My kinect hand cursor only works for main menu but when it goes to another page it wouldn''t work.. especially when there is for camera feed

Visual basic.net, how to create a screen for messages for a data transmissi...

how to create a screen for messages for a data transmission system

Use an insertion sort to sort an array, Use an insertion sort to sort an ar...

Use an insertion sort to sort an array (sequence) of long word integers. The size of the list will appear just before the list itself. Use the same labels as in this example: LE

Special matrices, Special Matrices There are some "special" matrices o...

Special Matrices There are some "special" matrices out there which we may use on occasion. The square matrix is the first special matrix.  A square matrix is any matrix that s

What are program visible and invisible resisters, What are program visible ...

What are program visible and invisible resisters? A4) Program visible is those registers that can be programmed by the users, or which are customizable, whereas Program invisible

Otrs customisation using perl, OTRS Customisation using Perl, MySQL Program...

OTRS Customisation using Perl, MySQL Programming OTRS is a perl based open source issue ticket management solution. Default performance features 'note-internal' that is visible

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd