top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

C++ : Why C++ is not a pure object oriented programming language ?

0 votes
721 views
C++ : Why C++ is not a pure object oriented programming language ?
posted Jul 10, 2014 by Harshita

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

I am giving some points which has been proven that c++ is not pure object oriented language:

1. C++ contains a 'C' dialect as a subset, permitting a purely procedural style of code.
2. In particular primitive datatypes in C++ have rules that are frequently different from datatypes that aren't primitive. Additionally it is possible to have functions that are not associated with any datatype at all
3. You can write "not exactly" OOP using C++ even without resorting to using the C subset. One such example is your main method - which is not contained in any class.
4. C++ is nothing but "C with classes". I can still write a C program and save it as .cpp file. So, Proof by implication says "C++ is not a purely object oriented language.
5. C++ supports intrinsic data types.
6. C++ is not a pure object oriented language, and as already mentioned above nothing forces you to use OOP concepts in C++. C++ is what you call a hybrid object oriented language, as it's based on C which is purely a procedural language.

Examples of pure object oriented languages are C# and JAVA.

answer Jul 11, 2014 by Amit Kumar Pandey
...