当前位置:网站首页>Two numbers replace each other
Two numbers replace each other
2022-07-05 00:13: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);
}
边栏推荐
- 用快解析内网穿透实现零成本自建网站
- Fast analysis -- easy to use intranet security software
- Combien de temps faut - il pour obtenir un certificat PMP?
- "Xiaodeng" domain password policy enhancer in operation and maintenance
- Parsing of XML
- Hologres Query管理及超时处理
- uniapp微信小程序拿来即用的瀑布流布局demo2(方法二)(复制粘贴即可使用,无需做其他处理)
- Application of fire fighting system based on 3D GIS platform
- JS 将伪数组转换成数组
- Acrel-EMS综合能效平台在校园建设的意义
猜你喜欢
OpenHarmony资源管理详解
lambda expressions
Ap8022 switching power supply small household appliances ACDC chip offline switching power supply IC
他做国外LEAD,用了一年时间,把所有房贷都还清了
Hisilicon 3559 universal platform construction: YUV422 pit stepping record
Combien de temps faut - il pour obtenir un certificat PMP?
使用快解析搭建自己的minecraft服务器
"Xiaodeng" domain password policy enhancer in operation and maintenance
ORB(Oriented FAST and Rotated BRIEF)
同事的接口文档我每次看着就头大,毛病多多。。。
随机推荐
2022.07.03(LC_6108_解密消息)
If you open an account of Huatai Securities by stock speculation, is it safe to open an account online?
快解析内网穿透帮助企业快速实现协同办公
How to apply for PMP project management certification examination?
P4408 [NOI2003] 逃学的小孩(树的直径)
AcWing164. 可达性统计(拓扑排序+bitset)
Consolidated expression C case simple variable operation
[error reporting] "typeerror: cannot read properties of undefined (reading 'split')“
Fs8b711s14 electric wine bottle opener MCU IC scheme development special integrated IC
JS 将伪数组转换成数组
Go pit - no required module provides Package: go. Mod file not found in current directory or any parent
Continuous modification of business scenario functions
Fast analysis -- easy to use intranet security software
企业公司项目开发好一部分基础功能,重要的事保存到线上第一a
业务场景功能的继续修改
如何有效对直流列头柜进行监测
Life is changeable, and the large intestine covers the small intestine. This time, I can really go home to see my daughter-in-law...
用快解析内网穿透实现零成本自建网站
Face recognition 5- insight face padding code practice notes
[IELTS reading] Wang Xiwei reading P4 (matching1)