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
Are strings immutable in c++?
what are the iterator and generic algorithms.
What is capacity in vector in c++?
What is c++ similar to?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
What is a flag in c++?
Out of fgets() and gets() which function is safe to use and why?
Explain linear search.
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
Comment on assignment operator in c++.
What is the protected keyword used for?
Explain container class.
what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?
What are c++ templates used for?
What is a namespace in c++?