What will happen if I allocate memory using "new" and free
it using "free" or allocate sing "calloc" and free it using
"delete"?

Answer Posted / ekta

free is not compatible with new.
free wont recognise the memory allocated by new and should
gie some error i guess.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is anonymous object in c++?

632


What is the difference between C and CPP?

635


Why is null pointer used?

686


Explain the difference between static and dynamic binding of functions?

557


What is abstract keyword in c++?

595






What is difference between c++ and c ++ 14?

580


What is virtual base class uses?

714


Differentiate between the message and method in c++?

612


What do you mean by static variables?

607


Differentiate between an inspector and a mutator ?

709


write a corrected statement so that the instruction will work properly. if (4 < x < 11) y = 2 * x;

1518


Mention the storage classes in c++.

653


Write about the local class and mention its use?

617


When should we use container classes instead of arrays?

586


Can I learn c++ without c?

607