#include <stdio.h>

int main()
{
 int arr1[10]={1,2,3,4,5,11,14,16,17,12};
 int arr2[10]={0,6,7,8,9,15,21,18,19,13};
 int arr3[10];
 int i=0;
 
 for(i=0;i<sizeof(arr1)/sizeof(arr1[0]);i++)
 {
  arr3[i]=arr1[i];
  arr1[i]=arr2[i];
  arr2[i]=arr3[i];
  //不定义第三个变量的两种种方法:
  //利用"+"运算符("-"运算符同理)
  //arr1[i]=arr1[i]+arr2[i];
  //arr2[i]=arr1[i]-arr2[i];
  //arr1[i]=arr1[i]-arr2[i];
  //利用"^"运算符
  //arr1[i]=arr1[i]^arr2[i];
  //arr2[i]=arr1[i]^arr2[i];
  //arr1[i]=arr1[i]^arr2[i];

 }
 for(i=0;i<sizeof(arr1)/sizeof(arr1[0]);i++)
 {
  printf("%d",arr1[i]);
 }
 printf("\n");
 for(i=0;i<sizeof(arr2)/sizeof(arr2[0]);i++)
 {
        printf("%d",arr2[i]);
 }
 printf("\n");
 return 0;
}