What is Tokens?How many Types?
In C language the smallest individual units are called Tokens. There are 6 types of Tokens in C language.
1) Keywords :
Every word in c language is either keyboard or an identities all keywords have fixed meaning and that meaning cannot be changed all keywords must be in lower case.
The following are keywords in C language.
3) constants :
In C language constant are fixed values that cannot be changed during the execute of a program.
There is two types of constants,
a) Numeric Constants
b) character constants
A) Numeric constants define two types,
1) Indigers constants
2) real Constants.
1) Integers Constant :
An integers constant refer to a sequence of digits. These are three types of integers constant.
a) decimal integers
b) Octal integers
c) Hexa decimal integers
A) Decimal integers :
Decimal integers consists of digits 0 to 9 procedured by an optional plus or minus (+ or - ) sign.
B) Octal integers :
An octal intigers constant consists of digits from 0 through 7 with leading zero.
C) hexa decimal integers :
And hexadecimal integers constant consist of digits 0 to 9 and proceed by axe proceed by Ox.
They also include alphabets F or a through f. The letters ye throw F represents the number 10 throw 15.
2) Real constant :
The number containing decimal point are called real or floating point constant.
This numbers are used to represent values such a prices, distance, temperature and soon.
(Example) 0.0087, 75.432,-2.4
B) Character constants define two types,
1) single character constants
2) sting constants.
1) single character constants :
A single character enclose to within a point of single quotes is called single character constants.
(Example) '5' 'water'
2) sting constants :
A string constant is a sequence of characters enclosed in double coats the character may be letters, numbers ,special symbols and blank space.
(Example) "Hello" "1997"
Tags
Education
