#include <stdio.h>
void change( int *pp[], int n);
int main(void) {
int a = 1;
int b = 2;
int *p[2] = {&a, &b};
int size = sizeof(p)/sizeof(p[0]);
change(p, size);
return 0;
}
void change( int *pp[], int n){
for(int i=0; i<n; i++){
*pp[i] += 1;
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNoYW5nZSggaW50ICpwcFtdLCBpbnQgbik7CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYSA9IDE7CglpbnQgYiA9IDI7CgkKCWludCAqcFsyXSA9IHsmYSwgJmJ9OwoJaW50IHNpemUgPSBzaXplb2YocCkvc2l6ZW9mKHBbMF0pOwoJY2hhbmdlKHAsIHNpemUpOwoJCglwcmludGYoIuWkieaVsGHjga7lgKTvvJolZFxuIiwgYSk7CglwcmludGYoIuWkieaVsGLjga7lgKTvvJolZFxuIiwgYik7CglyZXR1cm4gMDsKfQp2b2lkIGNoYW5nZSggaW50ICpwcFtdLCBpbnQgbil7Cglmb3IoaW50IGk9MDsgaTxuOyBpKyspewoJCSpwcFtpXSArPSAxOwoJfQp9Cg==