Difference Between C and C++

DIFFERENCE BETWEEN C AND C++

These are some differences 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 summarised as follows:
In C++ we can change the scope of a variable by using scope resolution operator. There is no such facility in C language.



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.
C allows a maximum of 32 characters in an identifier name whereas C++ allows no limit on identifier length.
C Language follows the top-down approach while C++ follows both top-down and bottom-up design approach.
C is a procedure language and C++ is an object oriented language.
C++ allows inheritance and polymorphism while C language does not.
C++ is an extension to C language and allows declaration of class, while C language does not allow this feature.

Post a Comment (0)
Previous Post Next Post