#include <stdio.h>
void func(int *w, int *x, int *y, int *z);
int main() {
    int data[3] ={3, 70, 700};
    int a, sum, *pa, *pb, *pc;
    a=6;
    pa = &a, pb=&data[0]; pc=data+1;
    func(data, pa, pb, pc);
    sum = data[0]+data[1]+data[2];
    printf("%d", sum);
}
void func(int *w, int *x, int *y, int *z){
    *w = *x+1;          //a의 값에 1을 증가하여 data[0]에 7을 입력
    w[1]=*(y+1);        //70을 w[1]즉 data[1]에 입력하므로 변화없음
    *(w+2)=z[1];        //data[1]의 z[1]은 data[2]이므로 700을 입력하여 변화없음
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: