why the memory allocated with new cant be freed using free()
Answer Posted / bharti
Because with new operator in C++ delete operator is used to
deallocate the memory. And with malloc() free() is used. S
it may not be supported by some of the compilers to free
memory with free() created by new.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is encapsulation example?
Why do pointers exist?
what type of question are asked in thoughtworks pair programming round ?
What is the diamond problem in inheritance?
What is inheritance in simple words?
Why multiple inheritance is not possible?
What is pure oop?
What is polymorphism explain?
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What are main features of oop? How Do you Code Composition and Aggregation in C++ ? What is inheritance write a program to show use of inheritance? What is encapsulation selenium? i am getting an of the type can not convert int to int *.
to overcome this problem what we should do? What is a null tree?