STEPS FOR DEVELOPING A
The program development process in C includes three
important stages namely:
Program coding and
All the three stages contribute to production of high
1) Program design :
• It is a foundation for good program.
• Program design basically concerned with
development strategy to be used in writing
program, in order to achieve solution of a
• This includes mapping out a solution
procedure and the form the program would
Program design involves 4 stages namely:
i) Problem analysis
ii) Outlining the program structure
iii) Algorithm development
iv) Selection of control structure
• Problem analysis: Before we think a
solution procedure to a problem, we must
fully understand the nature of the problem
and what we want the program to do.
• Outlining the program structure : Once we
have decided what we want and what we
have, the next step is to decide how to do it.
• As a structured language C lends itself to
• Top-down approach means decomposing of
solution procedure into tasks that form a
• The essence of top-down approach is to cut
the whole program into number of
independent constitutent tasks and then cut
into smaller subtasks
• This approach will produce a readable and
modular code that can be easily understood
• It also helps us classify overall functioning of
a program in terms of lower- level functions.
iii) Algorithm Development: Step by step
procedure for each function is known as
• The most common method of describing an
algorithm is through the use of flow charts.
• The other method is pseudo code.
flow chart represents algorithm pictorially,
while pseudo code describe the solution steps
in logical order.
iv) Control structures: Any algorithm can be
structured using three basic control structure
a) sequence structure b) selection structure
c) looping structure
a) Sequence structure: sequence structure
denotes the execution of statements
sequentially one after another.
b) Selection structure: selection structure involves
a decision , based on a condition and may
have 2 or more branches
Eg: if else and switch statements.
c) Looping structure: looping structure is used
when a set of instructions is evaluated
Eg: do, while, for statements.
A well designed program will provide
Coding is easy and error-free.
Testing is simple.
Maintence is easy
Good documentation is possible.
Cost estimates can be made more accurately.
Progress of coding may be controlled more
2) Program coding : progrm coding should be
readable and simple to understand.
• Complex logic and tricky coding should be
• The elements of coding include:
i) Internal documentation
ii) Construction of statements
iii) Generality of program
iv) Input/Output formats
3) Program testing: Testing is the process of
reviewing and executing a program with the
intent of detecting errors.
• The compiler can detect syntactic and
semantic errors, it cannot detect run-time and
logical errors that show up during execution of
• Testing should include necessary steps to
detect all possible errors in the program.
• Testing process may include following 2
i) Human testing and
ii) Computer-based testing.
a) Human testing : It is an effective errordetection
Process and is done before the computer based
• Human testing methods include code
inspection by programmer, code inspection by
test group and review by peer group.
• The test is carried out statement by statement
and is analyzed with respect to check list of
common programming errors.
• In addition to finding errors, the programming
style and choice of algorithm are reviewed.
b) Computer-based testing: computer based
testing involves two stages namely:
i) Compiler testing and
ii) Run-time testing
• Compiler testing is the simplest of two and
detects undiscovered syntax errors.
• The program executes when compiler
detects no more errors.
• Run-time errors may produce run-time error
messages such as “null-pointer assignments”
• When program is free from all such errors, it