Shall we use 'free' to free memory assigned by new, What are
the further consequences??
Answer Posted / guest
Yes we can use free which was assigned by new.but in this
case no destrctor will be called as free doesn't call this.
So it is recommended that we should not use free if we
allcoate the memory using new.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What's the order in which the objects in an array are destructed?
Differentiate between late binding and early binding.
Differentiate between structure and class in c++.
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What is double in c++?
What is a wchar_t in c++?
What is the benefit of c++?
How would you implement a substr() function that extracts a sub string from a given string?
What are advantages of using friend classes?
Is c++ slower than c?
What is general form of pure virtual function? Explain?
Which c++ compiler is best?
What is the use of endl?
What is an associative container in c++?
Is there structure in c++?