SlideShare a Scribd company logo
What is the difference between C and C++?
Following are the differences between C and C++:
C C++
C language was developed by Dennis Ritchie. C++ language was developed by Bjarne
Stroustrup.
C is a structured programming language. C++ supports both structural and object-
oriented programming language.
C is a subset of C++. C++ is a superset of C.
In C language, data and functions are the free
entities.
In the C++ language, both data and functions
are encapsulated together in the form of a
project.
C does not support the data hiding. Therefore,
the data can be used by the outside world.
C++ supports data hiding. Therefore, the data
cannot be accessed by the outside world.
C supports neither function nor operator
overloading.
C++ supports both function and operator
overloading.
In C, the function cannot be implemented
inside the structures.
In the C++, the function can be implemented
inside the structures.
Reference variables are not supported in C
language.
C++ supports the reference variables.
C language does not support the virtual and
friend functions.
C++ supports both virtual and friend functions.
In C, scanf() and printf() are mainly used for
input/output.
C++ mainly uses stream cin and cout to perform
input and output operations.
Ad

More Related Content

What's hot (20)

Operator Overloading
Operator OverloadingOperator Overloading
Operator Overloading
Nilesh Dalvi
 
Strings in C
Strings in CStrings in C
Strings in C
Kamal Acharya
 
Data types in C
Data types in CData types in C
Data types in C
Tarun Sharma
 
String functions in C
String functions in CString functions in C
String functions in C
baabtra.com - No. 1 supplier of quality freshers
 
Pointers in c++
Pointers in c++Pointers in c++
Pointers in c++
Vineeta Garg
 
Differences between c and c++
Differences between c and c++Differences between c and c++
Differences between c and c++
starlit electronics
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
TejaswiB4
 
What is identifier c programming
What is identifier c programmingWhat is identifier c programming
What is identifier c programming
Rumman Ansari
 
Union in C programming
Union in C programmingUnion in C programming
Union in C programming
Kamal Acharya
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
Sathish Narayanan
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
Ankur Pandey
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
Dhaval Kaneria
 
File handling in c++
File handling in c++File handling in c++
File handling in c++
baabtra.com - No. 1 supplier of quality freshers
 
Static Data Members and Member Functions
Static Data Members and Member FunctionsStatic Data Members and Member Functions
Static Data Members and Member Functions
MOHIT AGARWAL
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)Basic Concepts of OOPs (Object Oriented Programming in Java)
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
Function overloading ppt
Function overloading pptFunction overloading ppt
Function overloading ppt
Prof. Dr. K. Adisesha
 
Arrays
ArraysArrays
Arrays
SARITHA REDDY
 
String in c programming
String in c programmingString in c programming
String in c programming
Devan Thakur
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
programming9
 
Inheritance In Java
Inheritance In JavaInheritance In Java
Inheritance In Java
Arnab Bhaumik
 

Similar to Diff between c and c++ (20)

Procedure Oriented programming Object Oriented programming Basic Concept of ...
Procedure Oriented programming Object Oriented programming  Basic Concept of ...Procedure Oriented programming Object Oriented programming  Basic Concept of ...
Procedure Oriented programming Object Oriented programming Basic Concept of ...
Govt Engineering college badliya ajmer Rajasthan
 
The Differences Between C and C++
The Differences Between C and C++The Differences Between C and C++
The Differences Between C and C++
LingarajSenapati2
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]
Rome468
 
Advantage and Disadvantages of C++ programming.pptx
Advantage and Disadvantages of C++ programming.pptxAdvantage and Disadvantages of C++ programming.pptx
Advantage and Disadvantages of C++ programming.pptx
phalapagol
 
C+Comprehensive overview of the IoT system aims, architecture, challenges, ap...
C+Comprehensive overview of the IoT system aims, architecture, challenges, ap...C+Comprehensive overview of the IoT system aims, architecture, challenges, ap...
C+Comprehensive overview of the IoT system aims, architecture, challenges, ap...
vyshnavzpradeep619
 
Principles of object oriented programing
Principles of object oriented programingPrinciples of object oriented programing
Principles of object oriented programing
Ahammed Alamin
 
C++
C++C++
C++
Rome468
 
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTERC++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
groversimrans
 
object oriented programming language fundamentals
object oriented programming language fundamentalsobject oriented programming language fundamentals
object oriented programming language fundamentals
ChaithraCSHirematt
 
What is c ++
What is c ++What is c ++
What is c ++
vijaysonar11
 
What is c ++
What is c ++What is c ++
What is c ++
vijaysonar11
 
Unit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionUnit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introduction
AKR Education
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
shokeenk14
 
C vs c++
C vs c++C vs c++
C vs c++
Gaurav Badhan
 
Bhushan Rathi
Bhushan RathiBhushan Rathi
Bhushan Rathi
Bhushan Rathi
 
introductiontocprogramming datatypespp.pptx
introductiontocprogramming datatypespp.pptxintroductiontocprogramming datatypespp.pptx
introductiontocprogramming datatypespp.pptx
nandemprasanna
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
Prof. Dr. K. Adisesha
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
Prof. Dr. K. Adisesha
 
data science course with placement in hyderabad (12).pdf
data science course with placement in hyderabad (12).pdfdata science course with placement in hyderabad (12).pdf
data science course with placement in hyderabad (12).pdf
maneesha2312
 
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREC and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
The Differences Between C and C++
The Differences Between C and C++The Differences Between C and C++
The Differences Between C and C++
LingarajSenapati2
 
C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]C++ [ principles of object oriented programming ]
C++ [ principles of object oriented programming ]
Rome468
 
Advantage and Disadvantages of C++ programming.pptx
Advantage and Disadvantages of C++ programming.pptxAdvantage and Disadvantages of C++ programming.pptx
Advantage and Disadvantages of C++ programming.pptx
phalapagol
 
C+Comprehensive overview of the IoT system aims, architecture, challenges, ap...
C+Comprehensive overview of the IoT system aims, architecture, challenges, ap...C+Comprehensive overview of the IoT system aims, architecture, challenges, ap...
C+Comprehensive overview of the IoT system aims, architecture, challenges, ap...
vyshnavzpradeep619
 
Principles of object oriented programing
Principles of object oriented programingPrinciples of object oriented programing
Principles of object oriented programing
Ahammed Alamin
 
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTERC++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
C++ TRAINING IN AMBALA CANTT! BATRA COMPUTER CENTER
groversimrans
 
object oriented programming language fundamentals
object oriented programming language fundamentalsobject oriented programming language fundamentals
object oriented programming language fundamentals
ChaithraCSHirematt
 
Unit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introductionUnit 1 of c++ part 1 basic introduction
Unit 1 of c++ part 1 basic introduction
AKR Education
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
shokeenk14
 
introductiontocprogramming datatypespp.pptx
introductiontocprogramming datatypespp.pptxintroductiontocprogramming datatypespp.pptx
introductiontocprogramming datatypespp.pptx
nandemprasanna
 
data science course with placement in hyderabad (12).pdf
data science course with placement in hyderabad (12).pdfdata science course with placement in hyderabad (12).pdf
data science course with placement in hyderabad (12).pdf
maneesha2312
 
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTREC and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
C and C ++ Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
Ad

Recently uploaded (20)

Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Journal of Soft Computing in Civil Engineering
 
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdfML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
rameshwarchintamani
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
AI Publications
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdfLittle Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
Little Known Ways To 3 Best sites to Buy Linkedin Accounts.pdf
gori42199
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdfML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
ML_Unit_V_RDC_ASSOCIATION AND DIMENSIONALITY REDUCTION.pdf
rameshwarchintamani
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
Design of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdfDesign of Variable Depth Single-Span Post.pdf
Design of Variable Depth Single-Span Post.pdf
Kamel Farid
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
Empowering Electric Vehicle Charging Infrastructure with Renewable Energy Int...
AI Publications
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
Ad

Diff between c and c++

  • 1. What is the difference between C and C++? Following are the differences between C and C++: C C++ C language was developed by Dennis Ritchie. C++ language was developed by Bjarne Stroustrup. C is a structured programming language. C++ supports both structural and object- oriented programming language. C is a subset of C++. C++ is a superset of C. In C language, data and functions are the free entities. In the C++ language, both data and functions are encapsulated together in the form of a project. C does not support the data hiding. Therefore, the data can be used by the outside world. C++ supports data hiding. Therefore, the data cannot be accessed by the outside world. C supports neither function nor operator overloading. C++ supports both function and operator overloading. In C, the function cannot be implemented inside the structures. In the C++, the function can be implemented inside the structures. Reference variables are not supported in C language. C++ supports the reference variables. C language does not support the virtual and friend functions. C++ supports both virtual and friend functions. In C, scanf() and printf() are mainly used for input/output. C++ mainly uses stream cin and cout to perform input and output operations.
  翻译: