摘要: 1. 使用宏定义: #define SWAP(X, Y) (X) += (Y);(Y)=(X)-(Y);(X)=(X)-(Y); 2. 使用异或位操作符 int x = 21; int y = 12; x ^= y; y ^= x; x ^= y; #include <stdio.h> #inclu 阅读全文
posted @ 2020-04-13 08:42 唯一诺 阅读(447) 评论(0) 推荐(0)