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 (20)

Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
 
classes and objects in C++
classes and objects in C++classes and objects in C++
classes and objects in C++
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Prgramming paradigms
Prgramming paradigmsPrgramming paradigms
Prgramming paradigms
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
 
Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
Function overloading ppt
Function overloading pptFunction overloading ppt
Function overloading ppt
 
Header files of c++ unit 3 -topic 3
Header files of c++ unit 3 -topic 3Header files of c++ unit 3 -topic 3
Header files of c++ unit 3 -topic 3
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Introduction to c++ ppt 1
Introduction to c++ ppt 1Introduction to c++ ppt 1
Introduction to c++ ppt 1
 
C tokens
C tokensC tokens
C tokens
 
Function C programming
Function C programmingFunction C programming
Function C programming
 
History of c
History of cHistory of c
History of c
 
Interface in java
Interface in javaInterface in java
Interface in java
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
 
Class and object in C++
Class and object in C++Class and object in C++
Class and object in C++
 
Steps for c program execution
Steps for c program executionSteps for c program execution
Steps for c program execution
 
C presentation
C presentationC presentation
C presentation
 

Viewers also liked

difference between c c++ c#
difference between c c++ c#difference between c c++ c#
difference between c c++ c#Sireesh K
 
C++ vs C#
C++ vs C#C++ vs C#
C++ vs C#sudipv
 
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 CENTREjatin batra
 
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 CENTREjatin batra
 
Discussing Fundamentals of C
Discussing Fundamentals of CDiscussing Fundamentals of C
Discussing Fundamentals of Ceducationfront
 
Summer training in c++
Summer training in c++Summer training in c++
Summer training in c++DUCC Systems
 
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 CENTREjatin batra
 
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 PHPVibrant Technologies & Computers
 
Intro to C++ Basic
Intro to C++ BasicIntro to C++ Basic
Intro to C++ BasicShih Chi Lin
 
basics of C and c++ by eteaching
basics of C and c++ by eteachingbasics of C and c++ by eteaching
basics of C and c++ by eteachingeteaching
 
History of C/C++ Language
History of C/C++ LanguageHistory of C/C++ Language
History of C/C++ LanguageFarid Hilal
 
Evolution of c# - by K.Jegan
Evolution of c# - by K.JeganEvolution of c# - by K.Jegan
Evolution of c# - by K.Jegantalenttransform
 
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++ Samsil Arefin
 
Object Oriented Programming in PHP
Object Oriented Programming in PHPObject Oriented Programming in PHP
Object Oriented Programming in PHPLorna Mitchell
 

Viewers also liked (20)

Ppt of c++ vs c#
Ppt of c++ vs c#Ppt of c++ vs c#
Ppt of c++ vs c#
 
C vs c++
C vs c++C vs c++
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
 
basics of C and c++ by eteaching
basics of C and c++ by eteachingbasics of C and c++ by eteaching
basics of C and c++ by eteaching
 
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
 

Similar to C vs c++

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 introductionAKR Education
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++Manoj Kumar
 
Summer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxSummer training PPT Manasv Singharia.pptx
Summer training PPT Manasv Singharia.pptxshokeenk14
 
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 CENTERgroversimrans
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptxMugilvannan11
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming LanguageRamaBoya2
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solvingJustine Dela Serna
 
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 AmbalaBatra Computer Centre
 
c# usage,applications and advantages
c# usage,applications and advantages c# usage,applications and advantages
c# usage,applications and advantages mohamed drahem
 
20210417-cppRelevancy-DataStructures.pptx
20210417-cppRelevancy-DataStructures.pptx20210417-cppRelevancy-DataStructures.pptx
20210417-cppRelevancy-DataStructures.pptxSuman Garai
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++Ankur Pandey
 

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
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
What is C.docx
What is C.docxWhat is C.docx
What is C.docx
 

Recently uploaded

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 

Recently uploaded (20)

Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 

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.