Explain Identifiers and Keywords in Programming


Identifiers :

  1. Names given  to various  program elements.
  2. May consist letter , digits and underscore character , with no space between .
  3. First Character Must be Letter.
  4. Case Sensitive 

Keywords :

  1. Reserved Words that have standard , predefined meaning in C.
  2. Cannot be used as identifiers 
  3. Ok within Comments
Standard C Keywords :

auto  break  case  char  const  continue  double  else  enum  extern  float  for  int  long  register  return  return  short  unsigned  struct  switch  typedef  union  unsigned  void  default  do  goto  if  sizeof  static  volatile  while

VALID IDENTIFIERS                                          INVALID IDENTIFIERS

X                                                                                          10 abc
abc                                                                                      my-name
Simple_interest                                                                      "hello"
LIST                                                                                       (area)
Stud_name                                                                             %rate 
Empl_1
avg_empl_salary


0 Comments