What is wrong with the following code? int * x = (int *) malloc(100 * sizeof(int)); x = realloc(x, sizeof(int) * 200);

  1. If realloc fails, then the original memory is lost

  2. Nothing, realloc is guaranteed to succeed (by returning the original pointer)

  3. Nothing, realloc frees the original memory passed to it

  4. None of the above


Correct Option: A

Find more quizzes: