Tips for program designing in C language

March 09, 2015 , 0 Comments

Now, let us see "What are the tips to design a good program?"
Although the program design involves several stages, the following are the few important tips to design a good program:

I Tip: Make a program readable. It is a combination of the following:

  1. Careful choice of data structure or data type.
  2. Careful choice of variable names.
  3. Generous use of remarks or comments.
  4. Program indentation.
  5. General program design

II Tip: Stepwise refinement of a solution

  1. Break a problem into a sequence of relatively self-contained or independent sub-problems.
  2. Follow orderly flow of stepwise refinement.

III Tip: Avoid 'goto' statement to jump around, forward and backward, into and out of loops or blocks of statements. The blocks are also called compound statements.

  1. The programs using 'goto' are difficult to read and debug.
  2. The programs using 'goto' are called unstructured programs. Always hate such unstructured programs.

Bill Smithwick

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google