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 is scope in c++ with example?
What is constructor and destructor in c++?
What is else syntax in c++?
Can you write a function similar to printf()?
What is abstraction in c++?
What is a forward referencing and when should it be used?
Write about the local class and mention its use?
Explain the register storage classes in c++.
What are the advantages of using const reference arguments in a function?
When there is a global variable and local variable with the same name, how will you access the global variable?
What is dev c++ used for?
Define a conversion constructor?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What happens when the extern "c" char func (char*,waste) executes? What is a storage class? Mention the storage classes in c++.