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)

Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
TejaswiB4
 
C++ Overview PPT
C++ Overview PPTC++ Overview PPT
C++ Overview PPT
Thooyavan Venkatachalam
 
data types in C programming
data types in C programmingdata types in C programming
data types in C programming
Harshita Yadav
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
Prof. Dr. K. Adisesha
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
avikdhupar
 
Typecasting in c
Typecasting in cTypecasting in c
Typecasting in c
Tushar Shende
 
Data types
Data typesData types
Data types
Zahid Hussain
 
C tokens
C tokensC tokens
C tokens
Manu1325
 
Looping statements in C
Looping statements in CLooping statements in C
Looping statements in C
Jeya Lakshmi
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
Ankur Pandey
 
Pointer in c
Pointer in cPointer in c
Pointer in c
lavanya marichamy
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
Sathish Narayanan
 
friend function(c++)
friend function(c++)friend function(c++)
friend function(c++)
Ritika Sharma
 
Structure in C
Structure in CStructure in C
Structure in C
Kamal Acharya
 
Differences between c and c++
Differences between c and c++Differences between c and c++
Differences between c and c++
starlit electronics
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
tanmaymodi4
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
Prof. Dr. K. Adisesha
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming language
sanjay joshi
 
Function in C program
Function in C programFunction in C program
Function in C program
Nurul Zakiah Zamri Tan
 
C Programming: Control Structure
C Programming: Control StructureC Programming: Control Structure
C Programming: Control Structure
Sokngim Sa
 

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
 
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
 
C programming.pdf
C programming.pdfC programming.pdf
C programming.pdf
JitendraYadav351971
 
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)

some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Reagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptxReagent dosing (Bredel) presentation.pptx
Reagent dosing (Bredel) presentation.pptx
AlejandroOdio
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
Oil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdfOil-gas_Unconventional oil and gass_reseviours.pdf
Oil-gas_Unconventional oil and gass_reseviours.pdf
M7md3li2
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
Mathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdfMathematical foundation machine learning.pdf
Mathematical foundation machine learning.pdf
TalhaShahid49
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Smart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineeringSmart Storage Solutions.pptx for production engineering
Smart Storage Solutions.pptx for production engineering
rushikeshnavghare94
 
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
211421893-M-Tech-CIVIL-Structural-Engineering-pdf.pdf
inmishra17121973
 
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.