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