You are on page 1of 2

CSE Assignment

NAME OF FACULTY: DR.S.RAJU

Name Of Student : Vaibhav Bansal


Registration no. : 18BCY10112
Slot : B1-TB1-LB1
Class no. :1470

 Difference between C and C++ concept wise.

Concept C C++
Data type C does not provide String C++ provides Boolean or
or Boolean data types. It String data types. It
supports primitive & supports both user-
built-in data types. defined and built-in data
types.
Input/output scanf and printf is used in cin and cout is used in c++
c as input output type. as input output type.
Operators In C Programming functions While in C++ they were
were used for many replaced with operators
operations like Input like << and >> new and
(scanf), output (printf), delete operators.
memory allocation
(malloc) and de-
allocation (free).
Header files Eg :C header <math.h> Eg:C++ header <cmath>
will only have one that will have a version of
takes doubles. sqrt/pow that takes ints,
another that takes
floats, and another that
takes doubles.
Key words It contains32 keywords. It contains 52 keywords.
Control Structure in C do not Structure in C++
Structure provide the feature of provides the feature of
function declaration. declaring a function as
a member function of the
structure.
Features C is an older C++ is an extension
programming language language of C. It allows
that is described as for the highly
Hands-on. In this controlled object-
language, you must tell oriented code.
the program to do
everything. Moreover,
this language will let
you do almost anything.
Exception C does not support C++ supports Exception
Exception Handling. handling. Moreover, this
handling
However, it can be operation can be
performed using some performed using try and
workarounds. catch block.

You might also like