DIFFERENCE BETWEEN PROCEDURAL AND OBJECT ORIENTED PROGRAMMING
1. C Follows Procedural Programming Approach . It is also called
Structured programming approach. In Structured programming approach
the program has well defined structure
Structured programming approach. In Structured programming approach
the program has well defined structure
1. Quality 2. Production 3. Marketing
In Structured Programming , we first divide all departments into sections in
structured way. LIke Quality department will have two sections :- Q1, Q2
and so on.
structured way. LIke Quality department will have two sections :- Q1, Q2
and so on.
C++ FollowsObject Oriented Programming Approach
2. C Does have or support concept of "classes". In C there was concept
of "Structure" availaible. The main Problem with the concept of Structures is
Structures does not support the binding of Data or variable and function in
between them . In simple way we can say Structure does not support function .
of "Structure"
Structures does not support the binding of Data or variable and function in
between them . In simple way we can say Structure does not support function .
C++ has introduced the concept of "Classes". C++ has removed or
replaced the concept of Structures with classes . It has removed the problem
of non-support for function by Structures . Classes with OOPS most important
feature Encapsulation supports the binding the Data Members like variables
etc and Member functions like :- Void getdata( ) together in single user
defined data type called Class
replaced the concept of Structures with classes . It has removed the problem
of non-support for function by Structures . Classes with OOPS most important
feature Encapsulation supports the binding the Data Members like variables
etc and Member functions like :- Void getdata( ) together in single user
defined data type called Class
3. C divides the problems into functions means in this all work that is to be
performed by C program is divided into or grouped into set of statementscalled functions
C++ divides the problem into number of entities called objects. In this
different functions are made in one class and this class can be made by making
object of that class. An object of class is instance of that class like we create
a variable of inbuilt datatypes similarly we create objects of class types.
different functions are made in one class and this class can be made by making
object of that class. An object of class is instance of that class like we create
a variable of inbuilt datatypes similarly we create objects of class types.
4. C Programming Language does not consist of Object Oriented concepts
C++ is rich in Object Oriented Concepts . It is generally upgraded from
C by including OOPS . Main Object Oriented Concepts are as follows :-
C by including OOPS . Main Object Oriented Concepts are as follows :-
1. Polymorphism 2. Classes and Objects 3. Encapsulation
4. Abstraction 5. Inheritance 6. Data Hiding
4. Abstraction 5. Inheritance 6. Data Hiding
5. C lays more emphasis on how things are done means more attention is
given to creativity or functions
given to creativity or functions
6. In C Data is global and accessible to all the functions of the program without
any restrictions. so any function can change the data which reduces
data security and integrity. It means we can say By default the data
can be publically accessed by all its members
any restrictions. so any function can change the data which reduces
data security and integrity. It means we can say By default the data
can be publically accessed by all its members
In C++ Data associated functions are bind together into a single unit called
object, so the data of an object which protect data from unauthorized access, thus
maintaining the security and integrity of data.
object, so the data of an object which protect data from unauthorized access, thus
maintaining the security and integrity of data.
C++ represents real world modeling i.e. it is close to reality. In other words, it is consistent with the way in which human thinks about solving the problems. As we know programs are made for solving problems . Problems are real world problems.So that means the programs are designed for solving real world problems so if we have a programming language called C++ used for solving real world problems
8. C follows top down approach.
Read This To Clerify Difference Between Top-Down And Bottom-up Approach
9. C is used for designing medium sized applications
C++ is used for designing large and complex applications.
10. Simple user defined data types can be created
Complex user defined data types can be created .
11. Programming languages like C, Pascal, Fortran, Basic, etc follow this
11. Programming languages like C, Pascal, Fortran, Basic, etc follow this
approach. Programming languages like C++, Ada , Simula, Java, c#, Eiffel etc.
follow this approach.
It's kind of unreadable in Chrome, the column on the right is overlapping the main body of text. Can't appreciate the content when it's so hard to get to.
ReplyDeletesorry for that James i am going to correct it
Delete