How is C++ different from C?

How is C++ different from C?

In the world of programming, every programmer has always wondered what or how is C++ different from C? C is one of the oldest programming language. C++ is just an extended version of C. However both have nearly same syntax and perform same functions. Let’s see the difference between C and C++.

C vs C++

Difference between C and C++ :-

C C++ 
It was developed by Dennis Ritchie in 1972. It was developed by Bjarne Stroustrup in 1985. 
C++ was developed from C C++ is just an expansion of C 
It is procedure oriented programming language. It is object oriented programming language. 
It has 32 keywords. It has 95 keywords. 
It does not support polymorphism, encapsulation and inheritance. It supports polymorphism, encapsulation and inheritance. 
It does not provide data security. It provides data security. 
It supports only built-in data types. It supports built-in as well as user defined data types. 
It follows top down approach. It follows bottom up approach. 
It is function driven language. It is object driven language. 
It does not support function and operator overloading. It supports function and operator overloading. 
Difference between c and c++.

Developer –

C is developed by Dennis Ritchie at AT & T bells lab in the year 1972 whereas C++ is developed by Bjarne Stroustrup in the year 1985 at AT&T bells lab. It’s just an extension of C. It supports all the functions of C. Few concepts like classes, polymorphism, constructor, etc. were introduced in C++. At first C++ was named as C with classes later it was changed to C++(C plus plus).

Keywords –

Keywords are reserved words in any programming language which are assigned a particular task which cannot be changed. There are 32 keywords in C. Initially C++ had 48 keywords and with the time more keywords were added to make it more convenient. At present there are 95 keywords in C++.

OOPs –

C follows procedural programming structure, thus its functions are limited. C++ follows object oriented programming structure allowing it to perform various functions. It(C++) supports data abstraction, encapsulation, polymorphism, etc. making it more productive and data oriented.

Overloading –

C++ supports function and operator overloading. Function overloading means one function can be called multiple times with different set of parameters. For e.g. void volume(5); void volume(5,6); void volume(2,3,4). Operator overloading means redefining the function of the operator.

Conclusion –

We are pretty sure, “how is c++ different from c” will not bother you again. Want more such content? Follow us on Instagram to get daily updates. Also share it with your programming buddies and friends. If you have any doubt regarding this blogs then contact us or mention in the comment section.

Do visit again!



comments user

very nice work keep it up

    comments user

    Thank you for your kind words! It means a lot.๐Ÿ˜Š

Leave a Reply

Your email address will not be published. Required fields are marked *