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
Search for: what is pair in c++?
What are friend functions in C++?
What are the uses of pointers?
What is std :: flush?
What is the maximum combined length of command line arguments including the space between adjacent arguments?
Describe new operator?
How is c++ used in the real world?
Explain selection sorting?
What does #define mean in c++?
What is a literal in c++?
Why do we need pointers?
what is data abstraction in C++?
What are enumerations?
Explain some examples of operator overloading?
what is c++