#include
#include
int main ()
{
int i, j;
int *pointerData;
printf ("Enter number of items to be stored: ");
scanf ("%d", &i);
pointerData = (int*) calloc (i, sizeof(int));
if (pointerData==NULL)
exit (1);
for (j = 0; j < i; j++)
{
printf ("Enter number #%d: ", j);
scanf ("%d", &pointerData[ j ]);
}
printf ("You have entered: ");
for (j = 0; j < i; j++)
printf ("%d ", pointerData[ j ]);
free (pointerData);
return 0;
}