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

Answer Posted / p govind rao

1) C is a structural Language, but C++ is a object oriented
language.
2)C employs top down approach, but c++ employees bottom up
approach.
3) c doesn't support operator overloading but c++ support
operator overloading.
4) In C memory allocation is done with malloc statement
whereas in C++ it is done through new keyword.
5) Also memory is deal located in C using free statement
while in C++ deal location takes place through delete.
6) c is does not provide default argument but c++ is
provide default argument.
7) c is cant support the inheritance and polymorphism etc
but c++ support the inheritance and polymorphism etc.
8) c is low level language while c++ is sn high level
language.
9)C can not support all the feature of the C++. while c++
support all the features of C.
10. C variables are DECLARED in declaration section.C++
variables are DECLARED any where in the program.
11) C does NOT have NAMESPACE for avoid name collisions.
c++ has NAMESPACE feature.

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the oops and benefits of oops programming?

549


can we make game by using c

3415


What is overloading in oops?

596


officer say me - i am offered to a smoking , then what can you say

1577


How can you overcome the diamond problem in inheritance?

763






Explain the concepts involved in Object Oriented programming.

629


What is object-oriented programming? Webopedia definition

717


What are the features of oop?

632


Is data hiding and abstraction same?

567


What is ambiguity in inheritance?

621


What is the benefit of oop?

568


How is polymorphism achieved?

583


Can main method override?

583


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4234


Write a program to sort the number with different sorts in one program ??

1913