realloc()
ptr = realloc(ptr, x);
Here, ptr is reallocated with a new size x.
When you run the program, the output will be:
Enter size: 2
Addresses of previously allocated memory:26855472
26855476
Enter the new size: 4
Addresses of newly allocated memory:26855472
26855476
26855480
26855484
Mixed-up sentence exercise
Put the parts in order to form a sentence. When you think your answer is correct, click on "Check" to check your answer. If you get stuck, click on "Hint" to find out the next correct part.