int *p;
p = malloc(sizeof(int));
*p = 1;

p = realloc(p, sizeof(int) * 2);


こうするとp[0]には1が入っててp[1]で2番目を参照できる、でおk?