Difference Between C Programing and C++ Programing in Tabular Form.

Sno.FeatureC ProgramingC++ Programinng
1.MeaningComputer Programing LanguageGeneral-Purpose Programming Language
2.Developed bydennis_ritchie

Dennis Ritchie

Bjarne-Stroustrup

Bjarne Stroustrup

3.First appeared19721983
4.StructuredProcedural StructuredObject oriented Language.
5.Program DesignTop down approachBottom up approach
6.Operator overloadingis not possible in C.one of the greatest Feature of C++.
7.Namespace FeatureNo namespace FeatureNamespace Feature is present for avoiding Name collision.
8.RelationshipC is subset of C++.C++ is a superset of C.
9.Reference Variable.Not SupportSupport
10.Function used for Input.scanf(“”);cin>>variable;
11.Function used for Output.printf(“”);cout<<” “;
12.Polymorphismnot possible.Polymorphism is the most Important Feature of OOPS.
13.Virtual FunctionsNo virtual Functions are presentVirtual Functions are used
14.LevelLow-level languageMiddle-level language
15.SecureData is UnsecuredData is hidden in C++ and is not accessible to external functions. Hence, is more secure
16.ConceptsFuctionFunction , Classes
17.DeclarationMultiple Declaration of global variables are allowed.Multiple Declaration of global varioables are not allowed.
18.Datatypebuilt-in and primitive data types.Support both built-in and user define data types.
19.Memory Allocationmalloc() and calloc() Functions are used for Memory Allocation and free() function for memory Deallocating.new and delete operators are used for Memory Allocating and Deallocating
20.Pointers And ReferenceC supports only Pointerssupports both pointers and references.
21.Error handlingNot Define FunctionsDefine Functions
22.Exception handlingException Handling is not present.Exception Handling is done with Try and Catch block.
23.Header Filestdio.hiostream.h
24.Program#include <stdio.h>
int main()
{
printf(“hello, world\n”);
}
#include <iostream.h>
int main()
{
cout<<“Hello, world!\n”;
return 0;
}
25.Filename Extensions.c.cpp
(Visited 166 times, 1 visits today)
Share with Friends :
Written by:

Leave a Reply

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