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

Develop a program on behavior of hospital personnel, A psychologist is inte...

A psychologist is interested in learning about the voting behavior of college students.  (4 points for each part.)Design a study which would yield data on this topic. a. state y

Write a program to read a text file and create a dictionary, Write a progra...

Write a program to read a text file and create a dictionary. The keys for the dictionary should be all 26 letters of the alphabet and the values of the dictionary should be the lis

Find out starting address of stack segment, For the following Code answer t...

For the following Code answer the following questions-: .STACK 100H .DATA COUNT DB 10 TOTAL DW 4126H .CODE MAIN PROC MOV BX, 3F20H MOV AL, BL MOV BL, COUNT MOV

Information management system, Write a detailed description on how you woul...

Write a detailed description on how you would go about planning information system for an organisation

Python , Write a script that will list and count all of the images in a giv...

Write a script that will list and count all of the images in a given HTML web page. Each image starts with

Asp.net and c#, The method should call getAllCities() and return the index ...

The method should call getAllCities() and return the index of the City that has the shortest (euclidian) distance to the. longitude and latitude passed as parameters

Shell script to print left traingle, Normal 0 false false f...

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

Temperature Calculation system, Detailed Description: • The program will t...

Detailed Description: • The program will take temperature readings as input from user for specified number of consecutive days. • Program will store these temperature values into

Program for searching by indexing text files, Write a program that can faci...

Write a program that can facilitate searching by indexing text files according to words. In this task, you are given a large text file, sample.txt, which you will need to index the

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