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

Define reasons for using functions, Define Reasons for using Functions? ...

Define Reasons for using Functions? 1. Evade rewriting the same code over and over. 2. It is simpler to write programs and keep track of what they are doing. Codes are able t

Computer games development, Lazytown Constabulary are concerned that young ...

Lazytown Constabulary are concerned that young people in the town are unaware of the sorts of crime that they might encounter in their daily lives and are concerned that they may b

Oracle, What is "No_Data_Found" in Oracle?

What is "No_Data_Found" in Oracle?

Example of undetermined coefficients, Example :  Solve the following differ...

Example :  Solve the following differential equation. y (3)   -  12 y''+48 y' + 64 y = 12 - 32 e -8t + 2 e 4t Solution :    We first require the complementary solution

Microsoft intermediate language in .net, Microsoft Intermediate Language in...

Microsoft Intermediate Language in .NET When you create value in any terminology and gather, it will be changed to an 'Intermediate Language' (Microsoft Advanced Language - MSIL

C# xna game project, I need to finish my game project within two weeks usin...

I need to finish my game project within two weeks using XNA. Would you guys can help me to finish it? Thank you

Shell script to generate the series 1+x + x2+ x3+….+xn, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Systems of differential equations, In this section we need to take a brief ...

In this section we need to take a brief look at systems of differential equations which are larger than 2 x 2. The problem now is not like the first few sections where we looked at

General Programming , #questCustomers of a particular restaurant are descri...

#questCustomers of a particular restaurant are described with some categories. If the categories indicate the customer is a senior citizen, or the customer works for the restaurant

A Simple Distributed Computing Platform , You are asked to develop a replic...

You are asked to develop a replicator (client) that distributes a large job over a number of computers (a server group) on a single switched LAN (our BU04 lab). In this assignment,

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