What is the difference between creating an object,
using 'new' and using 'malloc'?
Answer Posted / guna
malloc
1) can't initialize the memory
2)type casting is required
3)malloc is a function.
4)can't be overloaded.
new
1) memory can be initialized
2)no type casting for operator
3)new is an operator
4)can be overloaded.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different scope C++ provide ?
Factory Method C++ – How to delete pointers returned by it
can any one help to find a specific string between html tags
which is changed to a sting..
weather.html looks (for location) is
Why c++ does not have finally? What is operator overloading in c++ example? What do you mean by overhead in c++? If there are two catch statements, one for base and one for derived, which should come first? Difference between a copy constructor and an assignment operator. Is c++ low level? How do I get good at c++ programming? Give example of a pure virtual function in c++? We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p? What is the difference between an array and a list? What does override mean in c++? What are the advantages of c++? Explain