Ads 468x60px

Labels

Thursday, 6 September 2012

Rules that are applicable to all C programs



                                                                                                                
   (a)  Each instruction in a C program is written as a separate statement. Therefore a complete C program
 would comprise of a series of statements.
     (b)  The statements in a program must appear in the same order in which we wish them to be
            executed; unless of course the logic of the problem demands a deliberate ‘jump’ or transfer of
            control to a statement, which is out of sequence.
     (c)  Blank spaces may be inserted between two words to improve the readability of the statement. 
           However, no blank spaces are allowed within a variable, constant or keyword
     (d)  All statements are entered in small case letters.
     (e)  C has no specific rules for the position at which a statement is to be written. That’s why it is 
          often called a free-form language.
     (f)  Every C statement must end with a ;. Thus ; acts as a statement terminator.