what is the main difference between c and c++?
Answers were Sorted based on User's Feedback
Answer / richa
c is not object oriented but c++ is object oriented
| Is This Answer Correct ? | 6026 Yes | 496 No |
Answer / rajeev kumar
Actually c is a procedural programming language which
cann't face the real world problem. It has some drawback
like a global data is shared by all function and if in a
large program it is find out difficult that which function
uses which data.
On the other hand c++ is an object oriented programming
language which eliminate some pitfall of conventional or
procedural programming language. It is a concept or
approach for designing a new software. It is nothing to do
with any programming language although a programming
language which support the oops concept to make it easier
to implement.
This is the main different between c and c++.
| Is This Answer Correct ? | 3762 Yes | 477 No |
Answer / chetna chaudhari
in c we use scanf function as standard input function,while
in c++ we use streame cin>> for input.like this for output
in c we use printf function,while in c++ we use cout<< as a
output function.
| Is This Answer Correct ? | 2605 Yes | 784 No |
Answer / ketan
c is a topdown approach while c++ is bottom up approach
| Is This Answer Correct ? | 2018 Yes | 307 No |
Answer / sumit gupta , bangalore
In object oriented programming, the programmer can solve
problems by breaking them down into real-life objects (it
presented the programmer with an opportunity to mirror real
life). What is an object? This topic is dealt with
extensively in the chapter on ‘Objects and Classes’ but a
brief introduction is provided here.
Consider the category of cars. All cars have some common
features (for example all cars have four wheels, an engine,
some body colour, seats etc.). Are all cars the same? Of
course not. A Fiat and a Ford aren’t the same but they are
called as cars in general. In this example cars will form a
class and Ford (or Fiat) will be an object.
For those people who know C programming, it would be useful
to know the differences between C and C++. Basically C++
includes everything present in C but the use of some C
features is deprecated in C++.
*C does not have classes and objects (C does not support
OOP)
*Structures in C cannot have functions.
*C does not have namespaces (namespaces are used to
avoid name collisions).
*The I/O functions are entirely different in C and C++
(ex: printf( ), scanf( ) etc. are part of the C language).
*You cannot overload a function in C (i.e. you cannot
have 2 functions with the same name in C).
*Better dynamic memory management operators are
available in C++.
*C does not have reference variables (in C++ reference
variables are used in functions).
*In C constants are defined as macros (in C++ we can
make use of ‘const’ to declare a constant).
*Inline functions are not available in C.
| Is This Answer Correct ? | 1710 Yes | 235 No |
Answer / chetna chaudhari,jalgaon
in c we use #include<stdio.h>as iclusion file,while in c++
we use #include<iostreame>as inclusion file.
| Is This Answer Correct ? | 2021 Yes | 949 No |
Answer / k.r.sukumar
The main difference between c and c++ is that " C is a
structured programming language while C++ is an object
programming language and also we have templates in C++ that
is not the case in C
| Is This Answer Correct ? | 946 Yes | 139 No |
Answer / mayuri
C C++
DATA IS NOT SECURED SECURED
TOP DOWN BOTTOM-UP
FOCUS ON PROCEDURES FOCUS ON DATA
PROGRAMS ARE DECOMPOSED INTO OBJECTS
INTO FUNCTIONS
allocation is done NEW OPERATOR
with malloc statement
UNOINS AND ENUMS AVALIABLE
ARE NOT AVALIABLE
DOES NOT PROVIDE PROVIDES
DEFAULT ARGUMENTS
| Is This Answer Correct ? | 919 Yes | 147 No |
Answer / jayasrinivas.donavalli
The main Difference between C and C++ is C is Object Based
program.that means in C also we have Object based
Applications like Structures and Unions.
C++ is Object Oriented Language that means entire
application will be depending on Objects only.
Uses of Object oriented Program is Reusability,Increase the
effiency of the program and it gives extra security like
Private data is also be there in C++.
C++ is the Advanced version of C.
In otherwords we say c++ supports both Object based and
Object oriented Applications
| Is This Answer Correct ? | 959 Yes | 221 No |
Answer / uma
c++ support operator overloading but
c doesn't support operator overloading..
| Is This Answer Correct ? | 594 Yes | 103 No |
What is interface in oop?
Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.
what is opps?why it is use in programming language?
what is the new version of oops
create a c++ program that will ask 10 numbers and display their sum using array.
What are the main differences between procedure oriented languages and object oriented languages?
9 Answers IBM, Infosys, Wipro,
Explain the advantages of inheritance.
What is abstraction in oops with example?
What is overloading in oop?
What are the OOPS concepts?
106 Answers A1 Technology, Bajaj, CTS, EDS, HP, Infosys, Intel, Microsoft, MNC, Persistent, PlanetSoft, ProConstructor, TCS, Virtusa, Wipro, YSoft Solutions,
What is polymorphism what are the different types of polymorphism?
What are the features of oop?