what is the main difference between c and c++?

Answers were Sorted based on User's Feedback



what is the main difference between c and c++?..

Answer / sudhir

c++ high level language,c low level language.
c is the top to bottom,but c++ is bottom to top language.
c++ is object oriented language,c is procedure oriented
languagr.

Is This Answer Correct ?    12 Yes 4 No

what is the main difference between c and c++?..

Answer / swethasindhu

c is not object oriented but c++ is object oriented

Is This Answer Correct ?    10 Yes 2 No

what is the main difference between c and c++?..

Answer / palak

C++ is an extension of C language. This means that you can
not only use the new features introduced with C++ but can
also use the power and efficiency of C language. C and C++
are no more language for writing compilers and other
languages, these general purpose languages are used
worldwide in every field.

Differences between c and c++.

The main difference between C and C++ is that C++ is object
oriented while C is function or procedure oriented. Object
oriented programming paradigm is focused on writing programs
that are more readable and maintainable. It also helps the
reuse of code by packaging a group of similar objects or
using the concept of component programming model. It helps
thinking in a logical way by using the concept of real world
concepts of objects, inheritance and polymorphism. It should
be noted that there are also some drawbacks of such
features. For example using polymorphism in a program can
slow down the performance of that program.

Is This Answer Correct ?    16 Yes 9 No

what is the main difference between c and c++?..

Answer / s. govind

C++ is an extension of c.
More features are available in C++ than C.
C is a basic step for C++.
The header files are different for C & C++.
C++ is an object oriented, but c is a procedure oriented.
C is top down approach but C++ is bottom up approach.
Data is not secured in C but data is secured in C++

Is This Answer Correct ?    10 Yes 3 No

what is the main difference between c and c++?..

Answer / nitish

1. c is a procedure oriented language. whereas c++ is an
object oriented language.

2. c is an predecessor to c++.

3. c uses functions for input/output as,
scan f/print f.
where as,
c++ uses functions as,
cin>>/cout<<.

4. c acted as a middle level language in the system
functioning. as, a link between
machine language and higher level language.

5. C don't support but c++ support polymorphism and
inheritance in its functioning..

and so on,
but one similarity between both of the 2 is that,
Both are case sensitive languages.
"A" means different from "a".

Is This Answer Correct ?    8 Yes 1 No

what is the main difference between c and c++?..

Answer / anket

Basically "c++" is the advanced version of "c" with some
newly added on features like o.o.p,inheritance, class
etc. .Also o.o.p helps us to represent real world entities
in our program.

Is This Answer Correct ?    8 Yes 1 No

what is the main difference between c and c++?..

Answer / mht

c s pp's lngvg c++ s oop's lngvg

Is This Answer Correct ?    8 Yes 1 No

what is the main difference between c and c++?..

Answer / ravi kumar martha

1. C is a general programming language. C++ is an Object
Oriented variant of C.

2.C++ was based on C and retains a great deal of the
functionality.
C++ does not retain complete source-level compatability
with C.

3.
In C, there's only one major memory allocation function:
malloc. You use it to allocate both single elements and
arrays and you always release the memory in the same way.

In C++, however, memory allocation for arrays is somewhat
different than for single objects.


you use the new[] operator, and you must match calls to new
[] with calls to delete[] (rather than to delete).

4.Although most good C code will follow this convention, in
C++ it is strictly enforced that all functions must be
declared before they are used. This code is valid C, but it
is not valid C++.

5.You have to include the struct keyword before the name of
the struct type to declare a struct: In C++, you could do
this, and have a new instance of a_struct called
struct_instance. In C, however, we have to include the
struct keyword when declaring struct_instance

6.you must include the keyword enum; in C++, you don't have
to. As a side note, most C programmers get around this
issue by using typedefs.

7.C++ has a much larger library than C, and some things may
be automatically linked in by C++ when they are not with C.
For instance, if you're used to using g++ for math-heavy
computations, then it may come as a shock that when you are
using gcc to compile C, you need to explicitly include the
math library for things like sin or even sqrt.

8.C does not provide a native boolean type. You can
simulate it using an enum, though.

9.In C++, you are free to leave off the statement 'return
0;' at the end of main; it will be provided automatically.

Is This Answer Correct ?    15 Yes 9 No

what is the main difference between c and c++?..

Answer / yogi

c is programming language,function based,simple & compact
c++ is an object oriented programming language,many people
use it as "better c"

Is This Answer Correct ?    11 Yes 5 No

what is the main difference between c and c++?..

Answer / priyanshu arya (delhi)

1.C is a structured programming language while C++ is an
object programming language .
2.c++ support operator overloading but c doesn't support
operator overloading
3. C employs top down approach, but c++ employes buttom up
approach.
4.C give emphasis in algorithims and functions, but C++
give emphasis on the data and objects.
5.In C we are using #include<stdio.h> as header file, but
in C++ we are using #include<iostream.h> as header file.
6.In C memory allocation is done with malloc statement
whereas in C++ it is done through new keyword.Also memory
is deallocated in C using free statement while in C++
deallocation takes place through delete.
7. *Inline functions are not available in C.
8.The I/O functions are entirely different in C and C++
(ex: printf( ), scanf( ) etc. are part of the C language).
9.Structures in C cannot have functions
10.You cannot overload a function in C (i.e. you cannot
have 2 functions with the same name in C).
11.C does not have reference variables (in C++
referencevariables are used in functions).
12.In other worlds C is used more with hardware while C++
is used more with software, mainly because of more
abstraction and features in C++.
13.You have to include the struct keyword before the name
of the struct type to declare a struct: In C++, you could
do this, and have a new instance of a_struct called
struct_instance. In C, however, we have to include the
struct keyword when declaring struct_instance
14.C++ has a much larger library than C, and some things
may be automatically linked in by C++ when they are not
with C.

Is This Answer Correct ?    7 Yes 1 No

Post New Answer

More OOPS Interview Questions

which is best institute to learn c,c++ in ameerpet hyderabad

1 Answers  


How do you achieve runtime polymorphism?

0 Answers  


Explain polymorphism? What r the types of polymorphism? pls give examples?

4 Answers   HCL,


Write a program to get the binary tree.

3 Answers   ABC,


Can static class have constructor?

0 Answers  






Why is polymorphism needed?

0 Answers  


What is a class?

32 Answers   Infosys, TCS, Thylak,


What is a class and object?

0 Answers  


different types of castings

3 Answers   Siemens,


what are the uses of C++

1 Answers  


What is the difference between class and object?

4 Answers   Apple, Heinz,


who is the founder of c++?

15 Answers   Hexaware, ONGC,


Categories