My C++ Quiz

The ultimate place for testing what you have learned



Home | Start Quiz | List of questions  | Next Question | Login / Register

Question #73: If you have an array of characters allocated with new. Which of the following is the best way to modify the size of the array?
70% on 748 times asked

Use the realloc function from libc
Delete the existing array, then allocate a new array and copy the data from the old array to the new array
Allocate a new array, copy the data from old array to the new array and then delete the old array
It is not possible to do such an operation in C++
© 2007-2010, My C++ Quiz, All rights reserved.
Can you find a bug in the quiz? Can you think of a new question that would be cool to add to this site? Email us and we will take action:
email us
Other Quizes | Contributors