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
How do c++ struct differs from the c++ class?
Can a class be static in c++?
Is c++ high level programming language?
Difference between Abstraction and encapsulation in C++?
What is size of string in c++?
Is there finally in c++?
Why do we learn c++?
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
What does scope resolution operator do?
what is Loop function? What are different types of Loops?
What is the role of static keyword for a class member variable?
What is object in c++ example?
What is split a string in c++?
What is data type in c++?
What is constructor and destructor in c++?