answersLogoWhite

0

What is label in c language?

Updated: 8/10/2023
User Avatar

Adhiedianne

Lvl 1
15y ago

Best Answer

used in defining goto statement in C++.

tells the program which part of the code it should skip to.

example:

void main()

{

x: // This is the label

cout<<"\n Wikipedia rocks" ;

cout<<"\n Google rocks" ;

goto x; // starts executing from x:

getch();

}

// Warning!! this loop will be infinite, plz do not run it, its only for example sake!!!

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

10y ago

A label is a name assigned by the programmer to a certain place in code. This can be used - among other things - as a destination for a Jump command.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is label in c language?
Write your answer...
Submit
Still have questions?
magnify glass
imp