What are the major differences between C and C++?



What are the major differences between C and C++?..

Answer / Shitin Kumar

Here are some key differences:n- Object-oriented programming features such as classes, objects, inheritance, polymorphism, and exceptions are available in C++ but not in C.n- Standard template library (STL) is a collection of templates for generic algorithms, containers, iterators, and allocators present in C++ but not in C.n- C++ provides namespaces to avoid naming collisions, while C does not.n- C++ has operator overloading, which allows operators like +, -, *, /, etc. to be redefined for user-defined types.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ Interview Questions

How do you work around them?

1 Answers   Amazon,


Write a C++ Program to Find whether given Number is Odd or Even.

1 Answers  


Question on Copy constructor.

1 Answers   Alter,


If class D is derived from a base class B

1 Answers  


What does it mean to declare a function or variable as static?

1 Answers   Amazon,


Write a program to read two numbers from the keyboard and display the larger value on the screen

1 Answers  


Explain encapsulation in C++.

1 Answers   Verifone,


Find the Factorial of a number using a program.

1 Answers   Accenture,


How can a C function be called in a C++ program?

1 Answers  


How to stop class inheritance in C++ with condition that object creation should be allowed

1 Answers  


In C++ what is a vtable and how does it work?

1 Answers   Agilent,


What is the difference between Stack and Queue in C++?

1 Answers   Global Logic, iNautix,


Categories