Procedural Programming Explained
It lays more Emphasis on procedure than data. C uses procedural programming and C++ is the super set of C so it can also be used as procedural programming language. Inline functions defaults arguments are a good example of this.
Procedural Programming paradigm separates the functions and the data manipulated by them. By separating the data and the functions problems are created such as:
1. Procedural Programming is susceptible to design changes.
For example: You created a structure like: struct person{ char name[20];
int age;
}
and there are many other functions using this structure. Now if there is a change in the structure like: struct person{ char name[20];
int age;
char address[30];
}
Now all the functions working on structure 'person' must also be modified to cope with the change in structure. The functions using the structure 'person' will need to be rewritten.
2. Procedural Programming waste more time than usual and cost.
As design changes, we have to change many things and have to apply modifications in the code that leads to wasting time and Money.
No comments:
Post a Comment