#include <stdio.h>
int main(void) {
int a[3] = {1,2,3,4,5};
int *p = a;
for(int i=0; i<3; i++){
printf("a[%d] :%d\n", i
, a
[i
]); printf("*(p+%d):%d\n", i
, *(p
+i
)); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYVszXSA9IHsxLDIsMyw0LDV9OwoJCglpbnQgKnAgPSBhOwoJCglmb3IoaW50IGk9MDsgaTwzOyBpKyspewoJCXByaW50ZigiYVslZF0gIO+8miVkXG4iLCBpLCBhW2ldKTsKCQlwcmludGYoIioocCslZCnvvJolZFxuIiwgaSwgKihwK2kpKTsKCX0KCXJldHVybiAwOwp9Cg==