Kizspy | Question: 38
(Choose 1 answer)
To reallocate ptr to be an array of 5 elements, which of the following statements generates an error?
int *ptr = malloc(sizeof(int));
A. ptr = realloc(ptr, 5* sizeof(int));
B. realloc(ptr, 5* sizeof(int));
C. ptr += malloc(5* sizeof(int));
D. realloc(ptr, 20);
E. ptr = realloc(ptr, 20);