#include #include int main() { int *pArray = malloc(5 * sizeof(int)); int i; if (pArray) { for (i = 0; i < 5; i++) { *(pArray + i) = i + 1; printf("%i\n", *(pArray + i)); } pArray = realloc(pArray, 1000 * sizeof(int)); if (pArray) { for (i = 0; i < 1000; i++) { *(pArray + i) = i + 1; printf("%i\n", *(pArray + i)); } free(pArray); } } return 0; }