Token,Keywords and Identifiers

Written By Unknown on Monday, October 7, 2013 | 3:09 PM

Token :
When we compile a program,compiler justify the program is correct or not.If there is no syntax error in our program then compiler take the whole program as some token.

Like a language contain a lot of words or symbol,C language also contain some token. Compiler turns those token into computer usable code.

Keywords :
Keywords are some reserved words that compiler can define and work with them.Like char is a keyword.According to ANSI C contain a total number of 32 keywords.

Keyword List :
1.auto                                 11.enum                           21.short
2.break                               12.extern                          22.signed
3.case                                 13.float                             23.sizeof
4.char                                 14.for                                24.static
5.const                                15.goto                             25.struct
6.continue                            16.if                                  26.switch
7.default                              17.int                                 27.typedef
8.do                                    18.long                              28.union
9.double                              19.register                         29.void
10.else                                20.return                            30.while

Identifiers : 
Identifiers are some name which is given to a variable,function or array in a program.

Ex :                              char ch
Here ch is an identifier.
Share this article :

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Learn Programming - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger| Distributed by Rocking Templates