C-Programming parts-3

Tokens :- A programming language contain some charector, string, constants and veriable thate are all about the Tokens .
The smallest individual unit on C-programming language are known as Tokens . Tokens are use to construct ( Creat ) a program. These tokens are categerical into 6 categrics.
          1.  Keywords  { int, float, char,double }
          2.  Identifires  { a , sum, main, sub  }
          3.  Constant   { 101, 11,14.5,1.23  }
          4.  Spacial charector { : , < >, { } , ~ }
          5.  String   { "Hello World" , "apple" }
          6.  Opretors {  + ,  = ,  / ,  * ,  %  }
1. Keywords :- keywords are the reserved words which have some specific meaning to the campiler ant there meaning can not be change .
Keyword are the basic building block for the program statement and they are written ing lovcwer case . There are 32 key words in C- programming language .        
auto             if             singned          type of
int                break          unsingned         continous
char           swich            do               goto
float           case               size of                     const
double       long             static                      exterm
struct         short            enuon                    return
union         for                register                  defoult
else             while            void                        valatile    
{Keyword allredy define by Dennis Ritches so we can not chage}

2.  Identifiber :- Identifiber are the means of variable , function , sturcture , union and array .
 * There are user define names which cantain squence of letters , digits  and undercore sign.
* In Identifiber we can use both upper case and lower case latter but commonly we can use lower case latter .

Rules :-
a. A keywords can not be used as an Identifiber
b. Frist charector of Identifiber must be can " alphabet or undercor sign ". It mean we con not digit at the frist place.
c. We can not  spce in a identifibers name .
d. We can not use special charector accept undercore sing.

3. Constnat :- constant are the first value and  these value can not be change during exepcation of program.


4.String :- string is the collection of charector and these charector are written inside the quaters.  eg. - "My name Is".
 Types of constants :- 
                             (A) . Numeric constant
                              (B). Charector constant
(A). Numeric constant :- Its again two su
         (a) Interger constant   { 1, 21, 14, 100 }
         (b) Real constant   {  1.23, 12.01 , 4.6 }
(B). Charector  constant :- Its allso two parts division
         (a) Single constnat  {"A" , "S", "J"  }
         (b) String constant  { "Hello"  , "Awesome"}
b division

5. Special symbol :-  In C-programming  language we use some special symbol to construct a program for example -
  { } ,  [ ],  < >,  : ,  ;

6. Opretors  :- Opretors in the special symbol which are used to preform same secific opretion on data value and variable .
  x + 5,  x -y ,  z=x*y  in these example opretors are  + , - , *, =
Ex.  :-    +,  - , * ,  / , %,  =

Comments

Popular posts from this blog

What is the Linux OS?

Type of operating systems -3