C++ is one of the most versatile languages in the world. It is used nearly everywhere for everything… systems programming (operating systems, device drivers, database engines, embedded, Internet of Things, etc.)

Enter Header Image Headline Here

Friday, 14 April 2017

C++ Identifiers : Tokans

                                C++ Identifiers : Tokans




We  have already seen, which are the different types of characters that are considered legal in c++. 

Tokans in C++ -


The group of characters that froms an basic building blok is called as Tokan. Tokan are of 4 types of token in c++.
    
  

A.  Identifier  :


Various data items with symbolic names in C++ is called as Identifiers. Following data item are called as Identifiers in C++ -

1.   Name of functions
2.   Name of array
3.   Name of variable
4.   Names of classes


The rules of naming identifiers in C++ :

1. C++ is case-sensitive so that Uppercase Letter and Lowercase Letter are different.

2. The name of identifier cannot being with a digit, However, Underscore can be used as first character while declaring the identifier.

3. Only alphabetic characters, digits and underscore (_) are permitted in C++ language for declaring identifier.

4. Other Special characters are not allowed for naming a variable/ identifier.

5. Keyword cannot be used as an identifier.


Some Example of Identifier in C++:

















0 comments:

Post a Comment

Popular Posts

Recent Posts

Categories

Unordered List

Text Widget