Sunday, March 25, 2007

Program Structures and properties

1. C program Structure and properties


void main(void)
statement 1;
statement 2;
statement n;

C program will have the above typical program structures. Every C program will have at least main function. Other functions, if present, are called from this main. The C style programming has the following features.


Procedural Programming Technique -
C program logic is built sequentially. The entire program flow is sequential from start to end like a procedure. There may be multiple threads and exits in between but the logic flows from start to end like a process.
Modular Programming -
C program is always a collection of function modules. The main function calls other functions. Entire main function can be a sequence of function calls where the entire process is broken down into modules.
Top Down Approach -
The programming approach used in C language is top down means; the program logic is built by making the functions calls assuming that the functions are present. Once the higher-level logic is built then these functions are implemented. While building the higher-level logic one need not bother about the lower level details of the functions to be implemented. Programmer can just assume the availability these modules and use them.

This Section will be continued...
Readers please leave your comments and any more expectations.

No comments:

Save Water and Save Life

Save Water and Save Life