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 ?||6025 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
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
|Is This Answer Correct ?||2604 Yes||784 No|
Answer / ketan
c is a topdown approach while c++ is bottom up approach
|Is This Answer Correct ?||2017 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
*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
DATA IS NOT SECURED SECURED
TOP DOWN BOTTOM-UP
FOCUS ON PROCEDURES FOCUS ON DATA
PROGRAMS ARE DECOMPOSED INTO OBJECTS
allocation is done NEW OPERATOR
with malloc statement
UNOINS AND ENUMS AVALIABLE
ARE NOT AVALIABLE
DOES NOT PROVIDE PROVIDES
|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|
Write a program to multiply 3x3 matrics
What are the different forms of polymorphism??
1. Define a class.
What normal C constructs work differently in C++?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
Base class has two public data members. How can i derive a new class with one datamember as public and another data member as private?.
why to use template classes in c++?
String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?
which feature are not hold visual basic of oop?
what are three tenets of object orinted Systems?Why they call like that ? Please answer me. Advance thanks.
what is SPL in c++.
Can you explain polymorphism?