What is the difference between C and C++ language?

Can you tell me the difference between C and C++ language and explain your answer

  • Riya Saini
  • Riya Saini
  • |
  • 17 May
  • |
  • 264 Views
  • |
  • 21 Answers

text limit upto 4000

  • 3

    C is procedure oriented but C++ is object oriented, means everything in C++ is in the form of objects and classes. as in real world all data is in the form of objects and classes more focus is given on data rather than on function or procedure or we can say data is considered as an important quantity in OOPs concept

    • Voted By:
    • Ankush ,
    • Kannan ,
    • Tm

  • 0

    1) C is an embedded program. C++ is an object oriented programing. 2) C is not secure. C++ is secure than C. 3) C is all about a main function. In C++ we can create class and objects.


  • 0

    The difference between C and C++ is that C is a procedure of programming language which does not support classes and objects, while C++ is a combination of both procedural and object-oriented programming language; therefore C++ also known as a hybrid language. With the help of C language Training in Delhi institute here I share some differences between C and C++ below:

    1.C was developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs.
    2. When compared to C++, C is a subset of C++.
    3.C supports the procedural programming paradigm for code development.
    4.C does not support object-oriented programming; therefore it has no support for polymorphism, encapsulation, and inheritance.
    5. In C (because it is a procedural programming language), data and functions are separate and free entities.
    6.C, being procedural programming, it is a function-driven language.
    7. In C, data are free entities and can be manipulated by outside code. This is because C does not support information hiding.

    C++
    1.C++ was developed by Bjarne Stroustrup in 1979 with C++'s predecessor "C with Classes".
    2.C++ is a superset of C. C++ can run most of C code while C cannot run the C++ code.
    3.C++ supports both procedural and object-oriented programming paradigms; therefore C++ is also called a hybrid language.
    4. Being an object-oriented programming language C++ supports polymorphism, encapsulation, and inheritance.
    5. In C++ (when it is used as an object-oriented programming language), data and functions are encapsulated together in the form of an object. For creating objects class 

    provides a blueprint of the structure of the object.
    6. In C++, Encapsulation hides the data to ensure that data structures and operators are used as intended.
    7.While, C++, being object-oriented programming, it is an object driven language.

     


  • 0

    C++ is completely object oriented programming .In C++ each and every class creation , function call will be with the help of an object created for that particular class.


  • 0

    C++ is the extended version of the c programming as a result increment operator is used in it's name 
    c is procedure oriented
    C++ is object oriented


  • 0

    c language is a procedural programing language and there is no classes and objects c++ language it supports both procedural programming and object oriented programing language


  • 0

    I think main difference between C and CPP is the concept of Object Oriented Programming in cpp. C is subset of CPP


  • 0

    C is an structure oriented programming language.......where as c++ is an object oriented programming language.......


  • 0

    C++ is much easier than C.Some additional coding are added to get advance level.C++ coding are simple


  • 0

    Following are some of the differences between C and C++.
    1.When compared to C++, C is a subset of C++. All valid C programs are valid C++ programs.
    2.C is a structural or procedural programming language, while C++ is an object oriented programming language.
    3.In C, Functions are the fundamental building blocks, while in C++, Objects are the fundamental building blocks.
    4.C doesn't have variable references, while C++ has variable references.
    5.C uses malloc and free for memory allocation while C++ uses new and delete for memory allocation.
    6.C does not provide direct support for error handling, while C++ supports exception handling that helps in error detection and smooth handling.
    7.C does not support function and operator overloading, while C++ supports both function and operator overloading.
    8.C doesn't support Generic programming, while templates in C++ allow to write generic programs.
    9.C doesn't support namespaces while C++ supports them.


  • 0

    C is procedure oriented language but C++ is object oriented language.


  • 0

    C is a procedural programming language and does not support classes and objects,
    while C++ is a combination of both procedural and object oriented programming language; therefore C++ can be called a hybrid language. 


  • 0

    In c classes are used and encapsulation polymorphism are performed where as in c set of function are written.and to store and print anything we use scanf and printf in c where as in c++ we use cout and cin to print and store


  • 0

    C is procedural oriented does not support classes and objects.where as c++ is procedural and object oriented.


  • 0

    c++ is object oriented language and where as we can't find with "C"


  • 0

    The major difference between C and C++ is that C is a procedural programming language and does not support classes and objects, while C++ is a combination of both procedural and object oriented programming language; therefore C++ can be called a hybrid language. 
    C provides malloc() and calloc()functions for dynamic memory allocation, and free() for memory de-allocation.
    C++ provides new operator for memory allocation and delete operator for memory de-allocation.


  • 0

    The biggest difference is that former is procedure oriented and the later is object oriented. Moreover the syntax of c+j is easier than C


  • 0

    There are so many differences between C and C++.
    Few differences are

    C was developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs.C++ was developed by Bjarne Stroustrup in 1979 with C++'s predecessor "C with Classes".

    When compared to C++, C is a subset of C++.C++ is a superset of C. C++ can run most of C code while C cannot run C++ code.


    C supports procedural programming paradigm for code development.C++ supports both procedural and object oriented programming paradigms; therefore C++ is also called a hybrid language.

    C does not support object oriented programming; therefore it has no support for polymorphism, encapsulation, and inheritance.Being an object oriented programming language C++ supports polymorphism, encapsulation, and inheritance.

    In C (because it is a procedural programming language), data and functions are separate and free entities.In C++ (when it is used as object oriented programming language), data and functions are encapsulated together in form of an object. For creating objects class provides a blueprint of structure of the object.

    In C, data are free entities and can be manipulated by outside code. This is because C does not support information hiding.In C++, Encapsulation hides the data to ensure that data structures and operators are used as intended.

    C, being a procedural programming, it is a function driven language.While, C++, being an object oriented programming, it is an object driven language.

    C does not support function and operator overloading.C++ supports both function and operator overloading.

    C does not allow functions to be defined inside structures.In C++, functions can be used inside a structure.

    C does not have namespace feature.C++ uses NAMESPACE which avoid name collisions.
    A namespace is a declarative region that provides a scope to the identifiers (the names of types, functions, variables, etc) inside it. Namespaces are used to organize code into logical groups and to prevent name collisions that can occur especially when your code base includes multiple libraries. All identifiers at namespace scope are visible to one another without qualification. Identifiers outside the namespace can access the members by using the fully qualified name for each identifier.

    C uses functions for input/output. For example scanf and printf.C++ uses objects for input output. For example cin and cout.

    C does not support reference variables.C++ supports reference variables.

    C has no support for virtual and friend functions.C++ supports virtual and friend functions.

    C provides malloc()and calloc()functions for dynamic memory allocation, and free() for memory de-allocation.C++ provides newoperator for memory allocation and deleteoperator for memory de-allocation.

    C does not provide direct support for error handling (also called exception handling)C++ provides support for exception handling. Exceptions are used for "hard" errors that make the code incorrect.


  • -1

    In c we don't have oops concepts but c++ we have oops concept,In c++ we use objects for solving the problems.


  • -1

    c is procedural programming language it does not support object
    c++ is object oriented programming language


Did Not Get The Answer? 
Contact people of Talent-C Language directly from here

C Language