一般做法
int a,b;
int temp;
 
temp = a;
a = b;
b = temp;
 
小技巧
 
int a,b;
 
a = a^b;
b = a^b;
a = a^b;
 
\n#单片机与嵌入式#
#单片机与嵌入式#
嘉立创EDA

还没有评论,抢个沙发!