answersLogoWhite

0

In C++ we provide names for the entities we create, the variables, functions and types in our programs. These names, or identifiers, are required to conform to some simple rules.


An identifier must start with a letter and is comprised of a sequence of letters and digits. Somewhat surprisingly, in this context the underscore _ is considered to be a letter (although there are conditions associated with its use). There's no restriction on the length of an identifier.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Is cin an output identifier in c plus plus?

No. In C++ with <iostream>, cin is a prefedined class that represents stdin, so it is an input identifier.


Can you pass addresses to a function in C plus plus?

If the identifier you want to pass is an ordinary identifier, pass it as the address of... function(&identifier); If the identifier you want to pass is an array identifier, pass its name... function(arrayname);


Are a10 and 10a same in C language?

No. Neither is a10 and A10.


What is the rules to be valid identifier?

In what language?


Is A N D is an identifier?

A N D is not an identifier as it has spaces in between each letter. A valid identifier DOES NOT have space in it.


What is swap in c plus plus programming language?

It is not a reserved word, so can be an identifier (name of a type/variable/function).


How do you write in c plus plus plus plus a number followed by a letter?

If you're asking how to create an identifier that begins with a number, then the answer is you cannot. All identifiers must begin with a letter or an underscore. If we allowed leading numbers, the compiler wouldn't be able to distinguish whether 42 was an identifier or a numeric value. Whereas _42 is clearly an identifier.


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 are the rules in constructing a valid identifier?

_,a-z, or A-Z


Is it possible to declare a keyword as an identifier in c plus plus?

No. Keywords are reserved and cannot be used as identifiers. However, C/C++ is case-sensitive. So although register is a reserved keyword, Register is not.


Is hello is an identifier token?

Yes. The word "hello" can be an identifier token. It is not a reserved word in C or C++, and it meets the criteria for being an identifier.


What are the hearing rods for identifier 'c' language?

The hearing rods for identifier "c" language is the function.