C Tokens

 C TOKENS-

A token is a smallest or basic unit of any program one or more character are grouped in sequence of from meaningful word. These meaningful words are called tokens. 




Tokens can be classified as-
1. keyword
2. Identifiers 
3. Constant
4. operator
5. special symbols

1. Keyword-

The keyword that have predefined meaning for compiler are called keyword since,
They are receiver for special purpose in c language.
eg-   int, void, if , else, float, char, do, for, switch, etc.

2. Identifier- 

An identifier is a synonyms of the to name. It is a word consisting of a sequence of one or more latter
or digits along only special character under score.

3. Constant-

A constant is a data item which will not be change during the execution program the constant 
in c languages are-

Integer constant-   It is a whole number without any decimal point.
Example-01,10,26,9 etc

floating constant-    The numeric value having fractional part are called floating point.
character constant.
Example-  3.4,8.6, 9.8 etc

string constant-   A sequence of character enclosed with a pair of double "" is called string constant.
Example-  "Gugu" , "kamini", "Rahul" etc

Character constant-  A character enclosed with a pair of single ' ' is called character constant. 
Example- 'a' ,  'b' etc.

4. Operator-

operators are the word of a language that helps the users performs computation on value. 
the value that can be operator by these operators are called.

Unary operator-  c has a class of operator that out upon a single operator to give a new 
value which type of operators are called unary operator.

Binary operator-  Binary operator requirement two variable to be evaluated +, -, *, %.

No comments:

Post a Comment