#include "defs.h"
int a[] = {0, 1, 2, 3, 4};
int *p[] = {a, a + 1, a + 2, a + 3, a + 4};
int **pp = p;
int main(void)
{
// a はポインタ(配列の先頭アドレス)、*a は int
PR(p, a); PRINT1(d, *a);
// p はポインタ配列の先頭アドレス、*p は int*、**p は int
PR(p, p); PR(p, *p); PRINT1(d, **p);
// pp は int**、*pp は int*、**pp は int
PR(p, pp); PR(p, *pp); PRINT1(d, **pp);
NL;
// それぞれインクリメント後の差分、値の表示
pp++; PRINT3(d, pp - p, *pp - a, **pp);// W: format specifies type 'int' but the argument has type 'long' [-Wformat]
pp++; PRINT3(d, pp - p, *pp - a, **pp);// W: format specifies type 'int' but the argument has type 'long' [-Wformat]
++pp; PRINT3(d, pp - p, *pp - a, **pp);// W: format specifies type 'int' but the argument has type 'long' [-Wformat]
++*pp; PRINT3(d, pp - p, *pp - a, **pp);//W: format specifies type 'int' but the argument has type 'long' [-Wformat]
NL;
// 再初期化
pp = p;
(void)**pp++; PRINT3(d, pp - p, *pp - a, **pp);// W: format specifies type 'int' but the argument has type 'long' [-Wformat]
(void)*++*pp; PRINT3(d, pp - p, *pp - a, **pp);// W: format specifies type 'int' but the argument has type 'long' [-Wformat]
++**pp; PRINT3(d, pp - p, *pp - a, **pp);// W: format specifies type 'int' but the argument has type 'long' [-Wformat]
return 0;
}