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
Why is "using namespace std;" considered bad practice?
What is null pointer and void pointer?
What is null and void pointer?
What is setfill c++?
Which field is used in c++?
What is the basic concept of c++?
What is polymorphism and its types?
How can you quickly find the number of elements stored in a static array?
What is the this pointer?
What happens when you make call 'delete this;'?
In a function declaration what does extern means?
Do you know the use of vtable?
Specify some guidelines that should be followed while overloading operators?
Explain the operator overloading feature in C++ ?
What is the difference between an array and a list?