#include <stdio.h>
int main(void) {
int a = 1;
int b = 2;
int *p[2];
p[0] = &a;
p[1] = &b;
printf("変数a:%p , %d \n", &a
, a
); printf("変数b:%p , %d \n", &b
, b
);
for(int i=0; i<2; i++){
printf("ポインタの配列p[%d]:%p ,%d \n", i
, p
[i
], *p
[i
] ); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYSA9IDE7CglpbnQgYiA9IDI7CgkKCWludCAqcFsyXTsKCQoJcFswXSA9ICZhOwoJcFsxXSA9ICZiOwoJCglwcmludGYoIuWkieaVsGHvvJolcCAsICVkIFxuIiwgJmEsIGEgKTsKCXByaW50Zigi5aSJ5pWwYu+8miVwICwgJWQgXG4iLCAmYiwgYiApOwoJCglmb3IoaW50IGk9MDsgaTwyOyBpKyspewoJCXByaW50Zigi44Od44Kk44Oz44K/44Gu6YWN5YiXcFslZF3vvJolcCAsJWQgXG4iLCBpLCBwW2ldLCAqcFtpXSApOwoJfQoJcmV0dXJuIDA7Cn0K