当前位置:网站首页>兩個數相互替換
兩個數相互替換
2022-07-05 00:12:00 【sunyin.liu】
#include <stdio.h>
void swap(int a, int b);
int main(){
int a = 5;
int b = 6;
// printf("a=%d,b=%d\n",a,b);
printf("a=%d,b=%d\n",a,b);
swap(a,b);
return 0;
}
void swap(int a,int b){
a = a ^ b;
b = a ^ b;
a = a ^ b;
printf("a=%d,b=%d\n",a,b);
}
边栏推荐
- 快解析——好用的内网安全软件
- 【雅思阅读】王希伟阅读P4(matching1)
- Chinese verification of JS regular expressions (turn)
- Application of multi loop instrument in base station "switching to direct"
- 微服务(Microservice)那点事儿
- P4281 [ahoi2008] emergency assembly / gathering (LCA)
- Life is changeable, and the large intestine covers the small intestine. This time, I can really go home to see my daughter-in-law...
- Hash table, hash function, bloom filter, consistency hash
- Design of emergency lighting evacuation indication system for urban rail transit station
- OpenHarmony资源管理详解
猜你喜欢

IT转测试岗,从迷茫到坚定我究竟付出了什么?

雅思考试流程、需要具体注意些什么、怎么复习?

ORB(Oriented FAST and Rotated BRIEF)

URL和URI

How to avoid arc generation—— Aafd fault arc detector solves the problem for you

快解析——好用的内网安全软件

Using fast parsing intranet penetration to realize zero cost self built website

Consolidated expression C case simple variable operation
![[IELTS reading] Wang Xiwei reading P4 (matching1)](/img/91/1b3f85410035f65acb0c205185f698.png)
[IELTS reading] Wang Xiwei reading P4 (matching1)

基于三维gis平台的消防系统运用
随机推荐
Ap8022 switching power supply small household appliances ACDC chip offline switching power supply IC
2022.07.03(LC_6111_统计放置房子的方式数)
2022.07.03(LC_6109_知道秘密的人数)
TS快速入门-函数
abc 258 G - Triangle(bitset)
Advanced template
Hisilicon 3559 universal platform construction: YUV422 pit stepping record
Remember to build wheels repeatedly at one time (the setting instructions of obsidian plug-in are translated into Chinese)
Enterprise application business scenarios, function addition and modification of C source code
快解析内网穿透帮助企业快速实现协同办公
他做国外LEAD,用了一年时间,把所有房贷都还清了
人生无常,大肠包小肠, 这次真的可以回家看媳妇去了。。。
P3304 [SDOI2013]直径(树的直径)
Fs8b711s14 electric wine bottle opener MCU IC scheme development special integrated IC
C语言中sizeof操作符的坑
【雅思阅读】王希伟阅读P4(matching2段落信息配对题【困难】)
Réseau graphique: Qu'est - ce que le Protocole d'équilibrage de charge de passerelle glbp?
Nine Qi single chip microcomputer ny8b062d single key control four LED States
如果炒股开华泰证券的户,在网上开户安全吗?
URL和URI