Wednesday 20 March 2013

C programing style


By on 10:46

Programming style:-
C programming


  •       C is a free form language.
  •       Write the program in lowercase letters. C program statements are written in lower case letters. Uppercase letters are used only for symbolic constants.
  •       Braces ({&}) groups program statement together and mark the beginning the end of function.
  •       A proper indentation of braces and statements would make a program easier to read and debug.
  •       Since C is a free-form language, we can group statements together on one line.
  • The statements:
                           a=b;
                           x=y+1;
                           z=a+x;
               
                      can be written on one line as a=b; x=y+1; z=a+x;

  • In the program:
                       main()
                      {
                                printf("Hello C");
                         }
                       can be written in one line as

                               main() { printf("Hello C"); }

  •         This style makes the program more difficult to understand and should not be used


About Manipallavan S

Hi friends.This is Manipallavan, am doing MCA in SVCE from Chennai.This blog contains Technical,Hardware and Networking and Interview tips.This blog will clarify your queries related to Technical

1 comments: