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 / roshan p.r.
Hi,
you cannot free a memory allocated with new using "free"
and in the same way callac with "delete"
because they are incompatable
| Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
What is the use of endl in c++ give an example?
What do nonglobal variables default to a) auto b) register c) static
What is endl?
Explain about Garbage Collector?
What is the iunknown interface?
What is the outcome of cout< a) 16 b) 17 c) 16.5
What is the difference between multiple and multilevel inheritance in c++?
What is const in c++?
What are the types of pointer?
What is difference between malloc()/free() and new/delete?
Is java easier than c++?
Why c++ is created?
What is the use of bit fields in structure declaration?
List down the guideline that should be followed while using friend function.
State the difference between delete and delete[].