CodesJava

Easy learning with example program codes

C vs CPP


CPP is a general purpose Object Oriented Programming language which evolved as an extension to C language. It is an intermediate level language, as it encapsulates the features of both high and low level language. If we compare C with CPP, the major difference is that C is a procedural language, however, C++ is an object oriented language. Other major differences are listed below:

 

CPP C
Supports both procedural and object oriented style of programming. Supports only procedural style of programming.
Modifiers can be used for class members to make it inaccessible for outside users. Data is less secured.
Follow bottom-up approach. Follow top-down approach.
cin and cout are used to perform input and output operations. scanf() and printf() are used for input/output.
Supports reference variables. Does not support reference variables.
Operator overloading is possible Operator overloading is not possible
Functions can be used in structure. Functions cannot be used in structure.
Programs are divided into functions and classes. Programs are divided into procedures and modules.
Supports function overloading. Does not support function overloading.
Provides exception handling using Try and Catch block. Exception handling can only be performed using other functions.
Supports the feature of namespace. Does not support the feature of namespace.

 

Posted in CPP   
Sign Up/ Sign In
Ask a Question


Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at hr@codesjava.com.

Development

We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on hr@codesjava.com.

Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki