#include <stdio.h>
#include <stdlib.h>
int main(void) {
double* a;
a
= (double*)malloc(sizeof(double)*5); // ここまでで、int型の配列(長さ4)ができた。
int i;
for(i=0;i<5;i++){
a[i]=(double)i/10;
}
printf("a[0]のアドレスは %p\n",&(a
[0]));
printf("a[1]のアドレスは %p\n",&(a
[1]));
printf("a[2]のアドレスは %p\n",&(a
[2]));
printf("a[3]のアドレスは %p\n",&(a
[3]));
printf("a[4]のアドレスは %p\n",&(a
[4]));
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBtYWluKHZvaWQpIHsKCWRvdWJsZSogYTsKCWEgPSAoZG91YmxlKiltYWxsb2Moc2l6ZW9mKGRvdWJsZSkqNSk7CgkvLyDjgZPjgZPjgb7jgafjgafjgIFpbnTlnovjga7phY3liJfvvIjplbfjgZU077yJ44GM44Gn44GN44Gf44CCCglpbnQgaTsKCWZvcihpPTA7aTw1O2krKyl7CgkJYVtpXT0oZG91YmxlKWkvMTA7Cgl9CglwcmludGYoImFbMF3jga7jgqLjg4njg6zjgrnjga8gJXBcbiIsJihhWzBdKSk7CglwcmludGYoIuOBneOBruS4rei6q+OBryAlbGZcbiIsYVswXSk7CgkKCXByaW50ZigiYVsxXeOBruOCouODieODrOOCueOBryAlcFxuIiwmKGFbMV0pKTsKCXByaW50Zigi44Gd44Gu5Lit6Lqr44GvICVsZlxuIixhWzFdKTsKCglwcmludGYoImFbMl3jga7jgqLjg4njg6zjgrnjga8gJXBcbiIsJihhWzJdKSk7CglwcmludGYoIuOBneOBruS4rei6q+OBryAlbGZcbiIsYVsyXSk7CgoJcHJpbnRmKCJhWzNd44Gu44Ki44OJ44Os44K544GvICVwXG4iLCYoYVszXSkpOwoJcHJpbnRmKCLjgZ3jga7kuK3ouqvjga8gJWxmXG4iLGFbM10pOwoKCXByaW50ZigiYVs0XeOBruOCouODieODrOOCueOBryAlcFxuIiwmKGFbNF0pKTsKCXByaW50Zigi44Gd44Gu5Lit6Lqr44GvICVsZlxuIixhWzRdKTsKCQoJcmV0dXJuIDA7Cn0K