Difference C Vs. C++


 

What is C programming language?


C is a structural or procedural oriented programming language. C language is middle-level programming language which is developed by Dennis Ritchie at Bell Lab. It is an ideal language for developing firmware systems. C programming language also called god's programming language as base for other languages. If we know C language, then we can easily learn other language


What is C++ programming language?

C++ is a special-purpose programming language developed by Bjarne Stroustrup at Bell Lab. C++ is a programming language that contains the feature of C language. C++ is an object-oriented programming language, it has both features of high and low-level language that's it is lool a intermediate level language.





                                                           Vs. C++  

                c              C++                      
1.  C is a procedural oriented language. | 1. C++ is Object oriented language.

2.  In C Data is not more secured.          | 2. In C++ Data is secure by it's special features.

3.  C follows the top-down approach.      | 3. C++ follows the bottom-up approach.

4.  C does not support function               | 4. C++ supports function overloading.
      overloading.                           
             
5.  In C scanf() and printf() are used     | 5. In C++ cin>> and cout<< are used for input              for input/output.                                       output.

6.  Operator overloading is not possible  | 6. Operator overloading is possible in C++.

7.  C programs are divided into               | 7. C++ programs are divided into function and  
      procedures and modules.                      Classes.

8.  Exception handling is not easy in C.  | 8. Exception handling is possible in C++ using Try                                                                           and Catch block.

9.  C does not support the inheritance,    | 9. C++ support the features of inheritance,
     polymophism, encapsulation features.       polymorphism, encapsulation.

10. The file extension of C is .c                | 10. The file extension of C++ is .cpp

11.  C only supports Pointer.                    | 11. C++ supports both Pointer and reference.

12.  C provides malloc() and calloc()        | 12. C++ provides a new operator for memory 
       function for dynamic memory                     allocation.
       allocation.

Comments

Most popular post

SDLC in Software Engineering