Is there a new/delete equivalent of realloc?



Is there a new/delete equivalent of realloc?..

Answer / rohit sah

No. It would have a number of difficult problems. Some of these are:
- Should the old instances in the memory be deleted and re-instantiated?
- How about contained classes?
- How about instances owned by the classes to be reallocated? These often have a pointer to their owner.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

Explain selection sorting?

0 Answers  


Mention the ways in which parameterized can be invoked. Give an example of each.

0 Answers  


How to implement flags?

2 Answers   Symphony,


In C++ cout is: a) object b) class c) something else

11 Answers   Infosys, Lehman Brothers,


What is cin clear () in c++?

0 Answers  






Explain operator overloading.

0 Answers  


Difference between a copy constructor and an assignment operator.

0 Answers  


What is function overloading c++?

0 Answers  


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

0 Answers  


Can you Mention some Application of C/C++?

0 Answers  


Are c and c++ similar?

0 Answers  


How do we implement inheritance in c++?

0 Answers  


Categories