C Programming Structure:
fig: C Programming Structure |
Procedural programming language like C is a collection of members (variable and fucntions) where these members are explicitly called from the main fucntion for execution because it was the entry point of the program.
Note: for most of the programming languages, main is the entry point from where execution starts.
Procedural languages lacks the features like "security" and "re-usability". To overcome the problems, in 70's a new approach in programming has been introduced known as "Object Oriented Approach" which provides security and re-usability.
In object oriented approach members are defined under a special container or wrapper known as a "Class", which provides the basic security for content that is present inside it.
fig: OOP |
If we want to invoke the members of a class, it can done only with the permission of class i.e., by creating its "Object".
CPP Programming Structure:
0 comments:
Post a Comment