Sunday, 4 January 2015

Difference between C and C++


Sr. No.
CLanguage
C++ Language
1
C is a procedural programming Language.
C++ is a multi-paradigm
language which means it is procedural as well as object
oriented language.
2
In C, importance is given to the steps or procedure of the program.
C++ focuses on the data rather than the process.
3
Data is not secure because oops feature such as data hiding etc. are not present in C.
Data is secure because it supports oops concepts.
4
C is a low-level Language.
It is Middle level Language.
5
C uses the top-down approach .Program is formulated step by step,
each step is processed into detail.
C++ uses the bottom-up approach. In C++ base elements are
first formulated which then are linked together to give rise to larger systems.
6
C is function-driven and Functions are the building blocks of a C program.
It is object-driven and objects are building blocks of a C++ program.
7
Function overloading is not supported in C.
It Supports Function Overloading.
8
It does not support NAMESPACE.
C++ uses NAMESPACE which avoid name collisions
9
It uses Printf, Scanf as standard input & output functions.
It uses cout<<, cin>> as standard input & output functions.
10
Reference Variables are not supported in C language.
C++ allows the use of reference variables which allow two variable names to point to the same memory location.
Alternate Links
Compare C and C++ Programming Languages
How C language is different from C++ programming language?
Difference between C and C++

1 comment:

  1. Difference between c and c++

    The main difference between C and C++ is, C is the procedure oriented language and C++ is the object oriented language.

    ReplyDelete