Give 10 points of differences between C & C++.
Answer / Neelabh Shukla
1. C++ supports object-oriented programming (OOP) while C does not.
2. C++ has exceptions and operator overloading, while C does not.
3. C++ has namespaces, whereas C does not.
4. C++ supports templates, whereas C does not.
5. C++ has a standard library with string manipulation, I/O functions, and more; C's standard library is smaller.
6. C++ provides an automatic memory management using new and delete, while C relies on manual memory allocation.
7. C++ allows function overloading, whereas C does not.
8. C++ supports multiple inheritance, whereas C supports single inheritance only.
9. C++ has a built-in support for complex numbers; C doesn't have built-in support but can use libraries to achieve it.n10. C++ allows inline functions, whereas C does not.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain static and dynamic memory allocation with an example each.
What is an incomplete type in c++?
What are the advantages of using a pointer? Define the operators that can be used with a pointer.
What is a virtual destructor? Explain the use of it?
what is C++ exceptional handling?
What is a parameterized type?
How to declare an array of pointers to integer?
How do I write a c++ program?
What are the various access specifiers in c++?
Show the declaration for a pointer to function returning long and taking an integer parameter.
Does c++ support exception handling?
Why is the function main() special?