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 / nisha

c is not c++ and c++ is not c

Is This Answer Correct ?    0 Yes 0 No

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

Answer / dolphy

real world programming is done in C++. while only an action is performed depending on the procedure in c.
top down approach is advantageous.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / boopathi

History of C Language

The C programming language was designed by Dennies Ritchie
in the early 1970s at Bell Laboratories. It was first used
system implementation language for the nascent Unix
operating system. The main reason to devised C was to
overcome the limitations of B. It was Derived from the
type-less language BCPL ((Basic Combined Programming
Language). C was was the evolution of B and BCPL by
incorporating type checking. It was originally intended for
use in writing compilers for other languages.
History of C++

C++ was devised by Bjarne Stroustrup in 1983 at Bell
Laboratories. It is an extension of C by adding some
enhancements to C language. Bjarne combined the simula's(a
language designed for making simulations, created by
Ole-Johan Dahl and Kristen Nygaard) features of object
oriented and the efficiency of C. The new features added to
language are templates, namespaces, exception handling and
use of standary library.

Difference between c and c++

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.
Here is a list of 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.

On the other hand, functional and procedural programming
focus primarily on the actions and events, and the
programming model focuses on the logical assertions that
trigger execution of program code.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / amit

c++ is a object oriented programming language.
while,
c is a structured based programing language.
In C++ you can create function overloading,
while,
in C you can't run two or more function with the same name.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / balaji.r

C is a procedurural oriented program it has certain
procedure but C++ is an Object oriented Program each and
every process doing in only with help of objects...

Is This Answer Correct ?    0 Yes 0 No

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

Answer / rutuja

C does not have any classes or objects. It is procedure and function driven. There is no concept of access through objects and structures are the only place where there is a access through a compacted variable. c++ is object oriented.
C structures have a different behaviour compared to c++ structures. Structures in c do not accept functions as their parts.
C input/output is based on library and the processes are carried out by including functions. C++ i/o is made through console commands cin and cout.
C functions do not support overloading. Operator overloading is a process in which the same function has two or more different behaviours based on the data input by the user.
C does not support new or delete commands. The memory operations to free or allocate memory in c are carried out by malloc() and free().
Undeclared functions in c++ are not allowed. The function has to have a prototype defined before the main() before use in c++ although in c the functions can be declared at the point of use.
After declaring structures and enumerators in c we cannot declare the variable for the structure right after the end of the structure as in c++.
For an int main() in c++ we may not write a return statement but the return is mandatory in c if we are using int main().
In C++ identifiers are not allowed to contain two or more consecutive underscores in any position. C identifiers cannot start with two or more consecutive underscores, but may contain them in other positions.
C has a top down approach whereas c++ has a bottom up approach.
In c a character constant is automatically elevated to an integer whereas in c++ this is not the case.
In c declaring the global variable several times is allowed but this is not allowed in c++.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / arti chalotra

we have not templets in C but we have templetes in C++.
C++ is the advanced version of C.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / arti chalotra

C++ have templates but C have no templates.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / subbu

c is not object oriented but c++ is object oriented.c is a
topdown approach while c++ is bottom up approach.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / siva

*C is a structure oriented programming. C++ is an object oriented programming. In c++ we can use OOPS concepts like Abstraction,Encapsulation,Inheritance and Polymorphism. So we can Hide data using Encapsulation but we can't in C.
*We can reuse our coding using Inheritance concept but not in C.
* We can Create Same function name with different functionality by using polymorphism.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is overriding vs overloading?

0 Answers  


What is function overloading and operator overloading?

4 Answers  


2. Give the different notations for the class.\

0 Answers  


write a program to find 2 power of a 5digit number with out using big int and exponent ?

0 Answers  


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

1 Answers  






What is polymorphism in oop example?

0 Answers  


i^=j; j^=i; i^=j; value of i,j

1 Answers  


What is multiple inheritance?

9 Answers   TCS,


Can static class have constructor?

0 Answers  


advantage and disadvantage in c++>>oops and what are the questions ask for interview in c++>>oops. could you tell me or reply me

0 Answers  


Explain virtual inheritance?

0 Answers  


What are the types of abstraction?

0 Answers  


Categories