Rules of C Programming

Following rules must be keep in mind before write any C Programs:

  1. Statement should be written in lower case letters. Upper case letters are not used for symbolic constants.
  2. Blank spaces may be inserted between the words. this improves the readability of the statements. However, it is not used while declaring a variable, keyword, constant, amd functions.
  3. It is not necessary to fix the position of statement in the program, i.e the program can write the statement anywhere between the two braces following the decelaration part. The user can also write one or more statements in one line separating them with semicolon (;). The following statement are valid.

    a = b+c;
     d = d*c;
    or
     a = b+c;d=b*c;
  4. The opening and closing braces should be balanced, i.e. if opening braces are four, then closing braces should also be four.

Post a Comment

0 Comments