What will happen if I allocate memory using "new" and free
it using "free" or allocate sing "calloc" and free it using
"delete"?
Answer Posted / sanjay makwana, puna
When you allocate a memory using new then constructor will
be called but when use a free that time destructor will not
be called.
Same vice versa for calloc and delete.
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the difference between structure and class?
How many keywords are used in c++?
Do the parentheses after the type name make a difference with new?
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop
What are the advantages of inheritance in c++?
What are the different types of polymorphism in c++?
What is meant by iomanip in c++?
Are there any special rules about inlining?
Is it possible to have a recursive inline function in c++?
Explain the operation of overloading of an assignment operator.
How do I download c++?
What is problem with overriding functions?
What is a constructor in c++ with example?
Show the declaration for a pointer to function returning long and taking an integer parameter.
what is scupper?