0% found this document useful (0 votes)
51 views2 pages

CSE Assignment Name of Faculty: Dr.S.Raju

This document contains a comparison of key concepts between C and C++ programming languages. C does not support data types like String or Boolean, while C++ supports both built-in and user-defined data types. C uses scanf and printf for input/output while C++ uses cin and cout. C++ introduced new operators like << and >> and new features like exceptions handling using try/catch blocks that are not present in C. Overall, C++ is an extension of C and allows for more object-oriented programming.

Uploaded by

vaibhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views2 pages

CSE Assignment Name of Faculty: Dr.S.Raju

This document contains a comparison of key concepts between C and C++ programming languages. C does not support data types like String or Boolean, while C++ supports both built-in and user-defined data types. C uses scanf and printf for input/output while C++ uses cin and cout. C++ introduced new operators like << and >> and new features like exceptions handling using try/catch blocks that are not present in C. Overall, C++ is an extension of C and allows for more object-oriented programming.

Uploaded by

vaibhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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