answersLogoWhite

0

What are labels in c language?

User Avatar

Anonymous

12y ago
Updated: 8/20/2019

Labels in C are used for CASE statements and for GOTOs (many people forget that C has GOTOs). The syntax goes like this:

if (some_condition) { goto MyGotoLabel; }

...

...

MyGotoLabel:

...

...

switch (MyVariable) {

case 1:

...

break;

case 2:

...

break;

default:

...

}

As you can see, both GOTO and CASE labels use a colon, which is a giveaway that they both really do the same thing. The switch/case statement is more structured than the goto, since it branches out from a single point and cannot go backwards and the range of where it can branch to is more clearly delineated, so it's a less-bad goto. But it's really still a goto.

Note that, unlike most interpreted C-based languages, C can only use a constant integer value (or a preprocessor macro that evaluates to a constant integer value) for a case label.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is an identifier. what are the hearing rods for identifier 'c' language?

An identifier is the names given for labels, functions and variables in the c language.


What is the meaning of identifiers in c language?

The NAMES that identify or represent the variables, constants, data types, functions and labels in C language.. They are mere(only) NAMES, that help in IDENTIFYING variables, data types, constants, functions and labels to differentiate them from each other.. A good identifier must be descriptive but short..


Which is not an instruction for the assembly of a language?

labels


Why c language has name c why not a?

C-language was derived from B-language.


What does etiquetas mean in Spanish?

etiquetas means labels. use freetranslation.com next time you have a language question. its really easy!


What is previous language of c language?

language before c language is pascal


What is C language what does it do?

C Language is First Step of Programming Language, Help for C Language you are show the correct answer


What is the topNet class that everything is derived from in c?

C language: int (but C is NOT a .net language) C# language: object or System.Object


What is the program language c?

C is a pop language. C is a case sensetive language. C is motherof all language. C is block structure language. C is a high level language. C is advace of B language. C developed by D.richties in 1972 at AT & T Bell lab in USA. Sachin Bhardwaj 986854722 skbmca@gmail.com


What is versions of c language?

versions of c language?


Is c a dependent language?

C is a independent language


What do you mean by c language?

C is a programming language.