Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Shall we use 'free' to free memory assigned by new, What are
the further consequences??

Answer Posted / aruna kumar samal

yes you can use free to free memory assignrd by new but it
wo not call the destructor.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is struct c++?

205


Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.

217


What is guard code in c++?

196


Why was c++ made?

219


What is c++ manipulator?

198






What is the use of endl in c++ give an example?

207


What is a down cast?

232


Explain the isa and hasa class relationships. How would you implement each?

205


What is the use of structure in c++?

203


Differentiate between an inspector and a mutator ?

222


What is the use of function pointer?

204


What is a map in c++?

214


Is c++ an integer?

199


What is the difference between equal to (==) and assignment operator (=)?

209


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

250