AN INTRODUCTION TO PROGRAM DESIGN

Your resource to c programming

While designing program the most important thing to consider is program design. In most cases a standard language called UML(unified modelling language ) is used which is typically help us designing the outline.We have to analyse the problem at hand and break up the problem into a number of parts. Each part will be called a Module or you can say that it is a modular approach to the problem.

From the above figure , the main() is at the apex of the program ,it means that no matter how many headers you make ,how many functions you write, all of them have to be called in the main() to get the output finally. In another way it gives clarity to the program.

The main() is followed by modules which is nothing but a function that contains many subfunction or you can say that they are the User Defined Header files. In A USER DEFINED header ,their are many function that are written by the programmer itself .
For example , you have a program calculates yearly intrest .
Now you will write all the necessary functions.
Now suppose you need the function that calculates the intrest rate in some other program or same program . One way is to declare all that variables external and write the function again or neat way is to keep the function in header file .When ever necessary we will call the function easily.Confused !!!. Take a look at the figure below.

END OF TUTORIAL
Hosted by www.Geocities.ws

1