Translate

Thursday, 1 November 2012

variable :
        variable is a storage location in the memory used to store some constant value. its value can be changed at run time.

Identifier:

      Identifier is fancy term used to mean "name". In C, identifier are used to refer to a number of things. It is used as a name of variable and Functions.

Rules for Identifier:
1). It Should start from Alphabet(Upper/lower) or underscore only.
 eg. Abc,hHk,h12,basic_sal(Valid),
12Basicsel(Invalid)
2).Upper Case and Lower case are considered different eg. int Bat,bat;(valid)
3). Key words are not allowed 
        eg. int float=45;(invalid)
             int Float=45;(valid) 

Key Words: 
             Key word refers to the reserved words in c/c++ which can't be used as a name of the variable etc.
 list of some of keyword:
  auto   const     double  float  int       short   struct   unsigned
break  continue  else    for    long      signed  switch   void
case   default   enum    goto   register  sizeof  typedef  volatile
char   do        extern  if     return    static  union    while

1 comment: