Tokens in C++ language:
Tokens is a smallest individual unit of a program .
In c++ language have followings types of tokens
Tokens is a smallest individual unit of a program .
In c++ language have followings types of tokens
- Keywords
- Identifiers
- Operators
- Constant
- String
- Special symbols
keywords
keywords are reserve word in a program which meaning reserved in compiler.
in c+ language has 48+15 key words.
Identifiers
Identifier refers to name of variables pointers functions structure union etc.
Rules for naming Identifier :
- Identifier can not be numeric and can not be start from numeric
- Identifier can not be any special character or can not be start from any special character.
- Identifier can not be keywords.
- Identifier length can not be more then 32 character long.
- Upper case and lower case letter are distinct.
Operators:
operators are the symbols that used on the operands for the specific purpose.
like
A+B
where A and B are the operands and + is a operator .
Constants
Constants refers to a fixed values that don't change during the executions of programs.
like:
234 integer constant
34.9 float constant
'A' character constant
etc.
String:
String are the collections of the character enclosed within double codes.
like:
"sheikh"
"abdul"
"mateen"
Special Symbols:
~`!@#$%^&*()_-+={[}]\|:;"'<,>.?/
No comments:
Post a Comment