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
Explain how a pointer to function can be declared in C++?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
What is the oldest programming language?
What is the purpose of extern storage specifier?
How many types of scopes are there in c++?
What is the difference between while and do while loop?
What do you mean by volatile and mutable keywords used in c++?
What is :: operator in c++?
How do you establish an is-a relationship?
What is input operator in c++?
Do you know the problem with overriding functions?
What is istream and ostream in c++?
What is wrapper class in c++?
what are the types of Member Functions?