#include <stdio.h>
void swap(int *x, int *y);
int main(void) {
int data1[5] = {1,2,3,4,5};
int data2[5] = {6,7,8,9,10};
for(int i=0;i<5;i++){
swap(&data1[i], &data2[i]);
}
return 0;
}
void swap(int *x, int *y){
int w;
w = *x;
*x = *y;
*y = w;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHN3YXAoaW50ICp4LCBpbnQgKnkpOwoKaW50IG1haW4odm9pZCkgewoJaW50IGRhdGExWzVdID0gezEsMiwzLDQsNX07CglpbnQgZGF0YTJbNV0gPSB7Niw3LDgsOSwxMH07CgkKCWZvcihpbnQgaT0wO2k8NTtpKyspewoJCXN3YXAoJmRhdGExW2ldLCAmZGF0YTJbaV0pOwoJCXByaW50ZigiJWRcbiIsIGRhdGExW2ldKTsKCQlwcmludGYoIiVkXG4iLCBkYXRhMltpXSk7Cgl9CgkKCXJldHVybiAwOwp9Cgp2b2lkIHN3YXAoaW50ICp4LCBpbnQgKnkpewoJaW50IHc7Cgl3ID0gKng7CgkqeCA9ICp5OwoJKnkgPSB3Owp9Cg==