Friday, July 10, 2015

c

Comments
Comments are like helping text in your C program and they are ignored by the compiler. They start with /* and terminates with the characters */ as shown below:
/* my first program in C */
You cannot have comments within comments and they do not occur within a string or character literals.
Identifiers
A C identifier is a name used to identify a variable, function, or any other user-defined item. An identifier starts with a letter A to Z or a to z or an underscore _ followed by zero or more letters, underscores, and digits (0 to 9).
C does not allow punctuation characters such as @, $, and % within identifiers. C is a case sensitive programming language. Thus, Manpower and manpower are two different identifiers in C. Here are some examples of acceptable identifiers:
mohd       zara    abc   move_name  a_123 myname50   _temp   j     a23b9      retVal
Keywords
The following list shows the reserved words in C. These reserved words may not be used as constant or variable or any other identifier names.

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

No comments:

Post a Comment