C is a structure oriented language where the code is organised in the form of blocks of codes that are executed to achieve the resultant output. The blocks of code can be functions, structure etc. It follows procedure paradigm.
Whereas, C++ is an object oriented language where the coding is done by using the user defined objects. Objects in turn are instances of class. Classes are based on the concept of data abstraction where all the related data and functions are grouped together and during execution instances of these classes called objects are used to refer to the data inside its respective class.
This is the main difference between C and C++. Apart from this other common differences are:
1. C files are stored with an extension '.c' whereas C++ files are stored with '.cpp'.
2. C is a low level language and is less user friendly where as C++ is a middle level language and is easily interpretable by the machine and is more user friendly too.
3. The execution in C is from top to down where as that in C++ is from bottom to up.
4. We cannot do overloading with C where as C++ supports both function and operator overloading.
Thanks & Regards,
Lead Editor(Ask Expert)
->C++ is Object Oriented Programming Language (OOP).
->C is mostly used to develop system software.
->C++ is mostly used to modal real life problem to program and use to develop application programs.
->C program has extension .C
->C++ program has extension .cpp
->C uses the top-down approach.
->while C++ uses the bottom-up approach.
->C is function-driven.
->while C++ is object-driven.
"Sharing Knowledge Is My Aim"
Think before act.
C++ is object oriented language which is based on Objects and having private mode of data accessing whereas C allows structure formation using public mode. the new concept of inheritance, abstraction, data hiding etc are not there in c language.
I am providing a link of article through which you can know the Difference between c and c++ in full detail.
C and C++ are the computer languages used for the programming concepts. The differences between C and C++ are noted below:
-> Unlike C, C++ is an object oriented language, i.e., it has class structures.
-> C file has extensions .c whereas C++ files has extensions .cpp
-> C files use stdio.h whereas C++ use iostream.h as standard header files
-> The I/O commands for C are scanf & printf, and for C++ are cin and cout.
-> C supports GTK tool whereas C++ supports Qt tools for GUI programming.
C++ is high level programming language. It come under the category of OOP's i.e Object oriented programming languages. Where as C is a procedural language.
But since the question is about the differences between both the languages.
* C language was developed in AT & T bell laboratories. While C++ is the higher version of C with GUI(Graphics user interface) features developed by B. Stroutstrup.
* C++ has also some special features which were not present in C. For example: GUI programming tools.
* C++ provides the concept of Data hyding as it supports the classes where as C does not provide any such concept of data hyding as it does not support classes.
* C++ provides different data visibility modes : Public, Private, and Protected. Where as C does not have different visibility mode to store data. It stores data in a default mode irrespective of the data type.
* C does not support any features of Inheritance. Inheritance is one of the special characterstics of inheriting functions and other features of one class to another class. C++ provides this feature.
* It's operating commands are different from that of C++. For example: printf(), scanf() in C and cout, cin in C++ to perform the same function of output and input respectively.
There are many other differences in C and C++. And after pointing out so many differences, it is clear that C++ is very good programming language.
"Fragrance of flowers spreads only in the direction of wind, but the goodness of a person spreads in all direction."
Editors, I pointed out a mistake in an answer. And for that no points ? What an editing here ?
Difference between them are:-
1) C is a non object oriented or object base language but c++ is object base language.
2) WE use for Structure programming concept in c. and We use Class programming concept in C++.
3)We unable to reuse code of c language, whenever in c++ we can reuse the code of c++ language.
4)C is the father of C++.
5)To save file we use .c in c whenever in c++ we use .cpp.
6)C++ is more powerful language instance of c.