#include <stdio.h>
/*
値渡しと参照渡し
*/
/* 値渡し */
void func1(int a) {
a = 789;
}
/* 参照渡し */
void func2(int a[]) {
a[1] = 1000;
}
int main(void) {
int a = 123;
int b[] = {1,2,3,4,5};
func1(a);
printf("after call func1:%d\n", a
);
func2(b);
for(int i=0; i<5; i++)
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgovKgoJ5YCk5rih44GX44Go5Y+C54Wn5rih44GXCiovCgovKiDlgKTmuKHjgZcgKi8Kdm9pZCBmdW5jMShpbnQgYSkgewoJYSA9IDc4OTsKfQoKLyog5Y+C54Wn5rih44GXICovCnZvaWQgZnVuYzIoaW50IGFbXSkgewoJYVsxXSA9IDEwMDA7Cn0KCmludCBtYWluKHZvaWQpIHsKCWludCBhID0gMTIzOwoJaW50IGJbXSA9IHsxLDIsMyw0LDV9OwoJCglmdW5jMShhKTsKCXByaW50ZigiYWZ0ZXIgY2FsbCBmdW5jMe+8miVkXG4iLCBhKTsKCQoJZnVuYzIoYik7Cglmb3IoaW50IGk9MDsgaTw1OyBpKyspCglwcmludGYoIiVkICIsIGJbaV0pOwoJcmV0dXJuIDA7Cn0K