「配列」内に格納されている整数を出力したい場合は、これは実際にはメモリ内のポインタです。コードを使用する場合:
int main(void)
{
int *arr = malloc(3*sizeof(int));
int *p = arr;
*arr++=1;
*arr++=2;
*arr=3;
while (??) // what should be filled in the while?
printf("%d",*p); // so that we can get the validly stored elements?
return 0;
}