SlideShare a Scribd company logo
1 of 23
Name : Gaurav Badhan
CSE-N1-115307
Univ. Roll no : 1144352
Contents
 Introduction
  C language, C++ language

 Similarities
  Built-in data types, compiler preprocessors etc.

 Differences
  Basic , Data security, Processing approach etc.

 Conclusion
   C (pronounced as "see”) is a general-purpose
    computer programming language developed
    between 1969 and 1973 by Dennis Ritchie at
    the Bell Telephone Laboratories.

   Although C was designed for
    implementing system,it is also widely used for
    developing portable application software.

   C is one of the most widely used programming
    languages of all timeand there are very
    few computer architectures for which a
    C compiler does not exist.
   C++ (pronounced "cee plus plus") is a statically
    typed,free-foem, multi paradigm,compiled, general-
    purpose programming languauge. It is regarded as
    an intermediate-level language, as it comprises a
    combination of both high level and low level language
    features. It was developed by Biarne Stroustrup
    starting in 1979 at Bell labs as an enhancement to
    the C language. Originally named C with Classes,
    the language was renamed C++ in 1983, as a pun
    involving the increment operator.


   C++ is one of the most popular programming
    languages with application domains including
    systems software, application drivers, device drivers,
    embedded software, high-performance server and
    client applications
 same   built-in data types. e.g.
   same compiler       preprocessor
     handles #include & #define
     conditional preprocessing #if, #ifndef and #endef
   same built-in operators on primitive
    types (+-/*……)
   Same built-in control structures
    -if, for, while, switch ….etc




                                       For
            If
   must have a function names “main” to
    determine where the program starts.
    e.g. void main(),int main()

   functions are defined the same way.



   programs can be split up into separate
    files e.g. functions prototype & calling
    etc.
 C follows the procedural programming
  paradigm while C++ is a multi-paradigm
  language (procedural as well as object
  oriented)
 In case of C, importance is given to the
  steps or procedure of the program while
  C++ focuses on the data rather than the
  process.
  Also, it is easier to implement/edit the code
  in case of C++ for the same reason.
   In case of C, the data is not secured
    while the data is secured(hidden) in
    C++.



   This difference is due to specific OOP
    features like Data Hiding which are not
    present in C.
   C is a low-level language while C++ is a
    middle-level language.

   C is regarded as a low-level
    language(difficult interpretation & less
    user friendly) while C++ has features of
    both low-level(concentration on what is
    going on in the machine hardware) & high-
    level languages(concentration on the
    program itself) & hence is regarded as a
    middle-level language.vel language.
   C uses the top-down approach while
    C++ uses the bottom-up approach.


   In case of C, the program is formulated
    step by step, each step is processed
    into detail while in C++, the base
    elements are first formulated which then
    are linked together to give rise to larger
    systems.
   C is function-driven while C++ is object-
    driven.



   Functions are the building blocks of a C
    program while objects are building
    blocks of a C++ program.
   Overloading means two functions
    having the same name in the same
    program. This can be done only in C++
    with the help of Polymorphism(an OOP
    feature).

   C++ supports function overloading while
    C does not support.
   The NAMESPACE feature in C++ is absent in
    case of C.


   C++ uses NAMESPACE which avoid name
    collisions. For instance, two students enrolled
    in the same university cannot have the same
    roll number while two students in different
    universities might have the same roll number.
    The universities are two different namespace
    & hence contain the same roll
    number(identifier) but the same university(one
    namespace) cannot have two students with
    the same roll number(identifier).
   The standard input & output functions
    differ in the two languages



   C uses scanf() & printf() while C++ uses
    cin>> & cout<< as their respective input
    & output functions.
   C++ allows the use of reference
    variables while C does not.



   Reference variables allow two variable
    names to point to the same memory
    location. We cannot use these variables
    in C programming.
C++, as the name suggests is a superset of
C. As a matter of fact, C++ can run most of
C code while C cannot run C++ code.

Both C and C++ have their best place at
their own with ample similarities and
differences.
Although C++ is a Superset of C language
yet c has its own existence and C++ has
also its own place in software and program
development.
C vs c++

More Related Content

What's hot

Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
daxesh chauhan
 

What's hot (20)

Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
 
Introduction to cpp
Introduction to cppIntroduction to cpp
Introduction to cpp
 
Files in c++
Files in c++Files in c++
Files in c++
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
C vs c++
C vs c++C vs c++
C vs c++
 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
 
Input and output in C++
Input and output in C++Input and output in C++
Input and output in C++
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
 
C fundamental
C fundamentalC fundamental
C fundamental
 
C++ OOPS Concept
C++ OOPS ConceptC++ OOPS Concept
C++ OOPS Concept
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
C++ language basic
C++ language basicC++ language basic
C++ language basic
 
Intro to c++
Intro to c++Intro to c++
Intro to c++
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Principles and advantages of oop ppt
Principles and advantages of oop pptPrinciples and advantages of oop ppt
Principles and advantages of oop ppt
 
FUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPTFUNCTIONS IN c++ PPT
FUNCTIONS IN c++ PPT
 
Functions in c++
Functions in c++Functions in c++
Functions in c++
 
Variables in C and C++ Language
Variables in C and C++ LanguageVariables in C and C++ Language
Variables in C and C++ Language
 
Lecture 1- History of C Programming
Lecture 1- History of C Programming Lecture 1- History of C Programming
Lecture 1- History of C Programming
 

Viewers also liked

Summer training in c++
Summer training in c++Summer training in c++
Summer training in c++
DUCC Systems
 

Viewers also liked (20)

Ppt of c++ vs c#
Ppt of c++ vs c#Ppt of c++ vs c#
Ppt of c++ vs c#
 
difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
 
Ppt of c vs c#
Ppt of c vs c#Ppt of c vs c#
Ppt of c vs c#
 
C language ppt
C language pptC language ppt
C language ppt
 
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
 
Discussing Fundamentals of C
Discussing Fundamentals of CDiscussing Fundamentals of C
Discussing Fundamentals of C
 
Summer training in c++
Summer training in c++Summer training in c++
Summer training in c++
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
C & C++ Training in Ambala ! BATRA COMPUTER CENTRE
C & C++ Training in Ambala ! BATRA COMPUTER CENTREC & C++ Training in Ambala ! BATRA COMPUTER CENTRE
C & C++ Training in Ambala ! BATRA COMPUTER CENTRE
 
PHP - Introduction to Object Oriented Programming with PHP
PHP -  Introduction to  Object Oriented Programming with PHPPHP -  Introduction to  Object Oriented Programming with PHP
PHP - Introduction to Object Oriented Programming with PHP
 
Intro to C++ Basic
Intro to C++ BasicIntro to C++ Basic
Intro to C++ Basic
 
History of C/C++ Language
History of C/C++ LanguageHistory of C/C++ Language
History of C/C++ Language
 
Evolution of c# - by K.Jegan
Evolution of c# - by K.JeganEvolution of c# - by K.Jegan
Evolution of c# - by K.Jegan
 
String in programming language in c or c++
 String in programming language  in c or c++  String in programming language  in c or c++
String in programming language in c or c++
 
Object Oriented Programming in PHP
Object Oriented Programming in PHPObject Oriented Programming in PHP
Object Oriented Programming in PHP
 
fundamentals of c
fundamentals of cfundamentals of c
fundamentals of c
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
 
A Brief Introduction to the Qt Application Framework
A Brief Introduction to the Qt Application FrameworkA Brief Introduction to the Qt Application Framework
A Brief Introduction to the Qt Application Framework
 

Similar to C vs c++

Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
shokeenk14
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solving
Justine Dela Serna
 

Similar to C vs c++ (20)

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
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 
Part 1
Part 1Part 1
Part 1
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptx
 
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
 
INTRODUCTION TO C LANGUAGE.pptx
INTRODUCTION TO C LANGUAGE.pptxINTRODUCTION TO C LANGUAGE.pptx
INTRODUCTION TO C LANGUAGE.pptx
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solving
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Programming in C
Programming in CProgramming in C
Programming in C
 
6 Week C++ Language Training In Ambala
6 Week C++ Language Training In Ambala6 Week C++ Language Training In Ambala
6 Week C++ Language Training In Ambala
 
Oops index
Oops indexOops index
Oops index
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
 
c# usage,applications and advantages
c# usage,applications and advantages c# usage,applications and advantages
c# usage,applications and advantages
 
C.pdf
C.pdfC.pdf
C.pdf
 
20210417-cppRelevancy-DataStructures.pptx
20210417-cppRelevancy-DataStructures.pptx20210417-cppRelevancy-DataStructures.pptx
20210417-cppRelevancy-DataStructures.pptx
 
What is C.docx
What is C.docxWhat is C.docx
What is C.docx
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)
 

Recently uploaded

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

C vs c++

  • 1. Name : Gaurav Badhan CSE-N1-115307 Univ. Roll no : 1144352
  • 2. Contents  Introduction C language, C++ language  Similarities Built-in data types, compiler preprocessors etc.  Differences Basic , Data security, Processing approach etc.  Conclusion
  • 3.
  • 4. C (pronounced as "see”) is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories.  Although C was designed for implementing system,it is also widely used for developing portable application software.  C is one of the most widely used programming languages of all timeand there are very few computer architectures for which a C compiler does not exist.
  • 5. C++ (pronounced "cee plus plus") is a statically typed,free-foem, multi paradigm,compiled, general- purpose programming languauge. It is regarded as an intermediate-level language, as it comprises a combination of both high level and low level language features. It was developed by Biarne Stroustrup starting in 1979 at Bell labs as an enhancement to the C language. Originally named C with Classes, the language was renamed C++ in 1983, as a pun involving the increment operator.  C++ is one of the most popular programming languages with application domains including systems software, application drivers, device drivers, embedded software, high-performance server and client applications
  • 6.
  • 7.  same built-in data types. e.g.
  • 8. same compiler preprocessor  handles #include & #define  conditional preprocessing #if, #ifndef and #endef
  • 9. same built-in operators on primitive types (+-/*……)
  • 10. Same built-in control structures -if, for, while, switch ….etc For If
  • 11. must have a function names “main” to determine where the program starts. e.g. void main(),int main()  functions are defined the same way.  programs can be split up into separate files e.g. functions prototype & calling etc.
  • 12.
  • 13.  C follows the procedural programming paradigm while C++ is a multi-paradigm language (procedural as well as object oriented)  In case of C, importance is given to the steps or procedure of the program while C++ focuses on the data rather than the process. Also, it is easier to implement/edit the code in case of C++ for the same reason.
  • 14. In case of C, the data is not secured while the data is secured(hidden) in C++.  This difference is due to specific OOP features like Data Hiding which are not present in C.
  • 15. C is a low-level language while C++ is a middle-level language.  C is regarded as a low-level language(difficult interpretation & less user friendly) while C++ has features of both low-level(concentration on what is going on in the machine hardware) & high- level languages(concentration on the program itself) & hence is regarded as a middle-level language.vel language.
  • 16. C uses the top-down approach while C++ uses the bottom-up approach.  In case of C, the program is formulated step by step, each step is processed into detail while in C++, the base elements are first formulated which then are linked together to give rise to larger systems.
  • 17. C is function-driven while C++ is object- driven.  Functions are the building blocks of a C program while objects are building blocks of a C++ program.
  • 18. Overloading means two functions having the same name in the same program. This can be done only in C++ with the help of Polymorphism(an OOP feature).  C++ supports function overloading while C does not support.
  • 19. The NAMESPACE feature in C++ is absent in case of C.  C++ uses NAMESPACE which avoid name collisions. For instance, two students enrolled in the same university cannot have the same roll number while two students in different universities might have the same roll number. The universities are two different namespace & hence contain the same roll number(identifier) but the same university(one namespace) cannot have two students with the same roll number(identifier).
  • 20. The standard input & output functions differ in the two languages  C uses scanf() & printf() while C++ uses cin>> & cout<< as their respective input & output functions.
  • 21. C++ allows the use of reference variables while C does not.  Reference variables allow two variable names to point to the same memory location. We cannot use these variables in C programming.
  • 22. C++, as the name suggests is a superset of C. As a matter of fact, C++ can run most of C code while C cannot run C++ code. Both C and C++ have their best place at their own with ample similarities and differences. Although C++ is a Superset of C language yet c has its own existence and C++ has also its own place in software and program development.