C++ Programmer Question:
Tell me what is difference between C and C++?
Answer:
☛ C++ is Multi-Paradigm ( not pure OOP, supports both procedural and object oriented) while C follows procedural style programming.
☛ In C data security is less, but in C++ you can use modifiers for your class members to make it inaccessible from outside.
☛ C follows top-down approach ( solution is created in step by step manner, like each step is processed into details as we proceed ) but C++ follows a bottom-up approach ( where base elements are established first and are linked to make complex solutions ).
☛ C++ supports function overloading while C does not support it.
☛ C++ allows use of functions in structures, but C does not permit that.
☛ C++ supports reference variables ( two variables can point to same memory location ). C does not support this.
☛ C does not have a built in exception handling framework, though we can emulate it with other mechanism. C++ directly supports exception handling, which makes life of developer easy.
☛ In C data security is less, but in C++ you can use modifiers for your class members to make it inaccessible from outside.
☛ C follows top-down approach ( solution is created in step by step manner, like each step is processed into details as we proceed ) but C++ follows a bottom-up approach ( where base elements are established first and are linked to make complex solutions ).
☛ C++ supports function overloading while C does not support it.
☛ C++ allows use of functions in structures, but C does not permit that.
☛ C++ supports reference variables ( two variables can point to same memory location ). C does not support this.
☛ C does not have a built in exception handling framework, though we can emulate it with other mechanism. C++ directly supports exception handling, which makes life of developer easy.
Previous Question | Next Question |
Tell me does an abstract class in C++ need to hold all pure virtual functions? | Tell us what is the use of volatile keyword in c++? Give an example? |