Difference between C and C++ | Object Oriented Programming (OOP)

Download our Android App from Google Play Store and start reading Reference Notes Offline.

difference between C and C++Difference between C and C++
Object Oriented Programming(OOP)
Third Semester | Second year
BSc.CSIT | Tribhuvan University (TU)

Difference between C and C++
C++ is regarded as an intermediate-level language. It comprises a combination of both high-level and low-level language features. C++ is an extension to C Programming language. The difference between the two languages can be summarized as follows;

  • The variable declaration in C, must occur at the top of the function block and it must be declared before any executable statement. In C++ variables can be declared anywhere in the program.
  • In C++ we can change the scope of a variable by using scope resolution operator. There is no such facility in C language.
  • C language follows the top-down approach while C++ follows both top-down and bottom-up design approach.
  • C is a procedural programming language and C++ is an object oriented programming language.
  • C allows a maximum of 32 characters in an identifier name whereas C++ allows no limit on identifier length.
  • C++ is an extension to C language and allows declaration of class, while C language does not allow this feature.
  • C++ allows inheritance and polymorphism while C language does not.
(Visited 383 times, 1 visits today)

Posted By : Digvijay | Comment RSS | Category : Third Semester
Tag :

Post a Comment

Your email is never published nor shared. Required fields are marked *


Wordpress DMCA
Community | Toolbar | Android App | Founder/Developer : Hari Prasad Chaudhary | CSIT Portal Manager : Digvijay Chaudhary