当前位置:网站首页>两个数相互替换
两个数相互替换
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);
}
边栏推荐
- Skills in analyzing the trend chart of London Silver
- 2022.07.03(LC_6108_解密消息)
- 企业公司项目开发好一部分基础功能,重要的事保存到线上第一a
- Robot reinforcement learning synergies between pushing and grassing with self supervised DRL (2018)
- Build your own minecraft server with fast parsing
- Some basic functions of enterprise projects are developed, and important things are saved to online first a
- P4281 [ahoi2008] emergency assembly / gathering (LCA)
- In the enterprise, win10 turns on BitLocker to lock the disk, how to back up the system, how to recover when the system has problems, and how to recover quickly while taking into account system securi
- Go pit - no required module provides Package: go. Mod file not found in current directory or any parent
- Combien de temps faut - il pour obtenir un certificat PMP?
猜你喜欢

他做国外LEAD,用了一年时间,把所有房贷都还清了

Skills in analyzing the trend chart of London Silver

海思3559万能平台搭建:YUV422的踩坑记录

用快解析内网穿透实现零成本自建网站

2022.07.03(LC_6111_统计放置房子的方式数)

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

Fs8b711s14 electric wine bottle opener MCU IC scheme development special integrated IC
![[path planning] RRT adds dynamic model for trajectory planning](/img/98/dd9b106fd9dc64e676d9c943c03ab3.jpg)
[path planning] RRT adds dynamic model for trajectory planning

Jar batch management gadget

How many triangles are there in the golden K-line diagram?
随机推荐
Business implementation - the log is written to the same row of data
Hash table, hash function, bloom filter, consistency hash
同事的接口文档我每次看着就头大,毛病多多。。。
[paper reading] cavemix: a simple data augmentation method for brain vision segmentation
如何在外地外网电脑远程公司项目?
JS 将伪数组转换成数组
Hologres Query管理及超时处理
[Peking University] tensorflow2.0-1-opening
What is the difference between port mapping and port forwarding
Instructions for go defer
【雅思阅读】王希伟阅读P4(matching2段落信息配对题【困难】)
The input of uniapp is invalid except for numbers
Using the uniapp rich text editor
雅思考试流程、需要具体注意些什么、怎么复习?
How long does it take to obtain a PMP certificate?
业务场景功能的继续修改
Acwing164. Accessibility Statistics (topological sorting +bitset)
打新债开户注册安全吗?有没有风险的?靠谱吗?
How to effectively monitor the DC column head cabinet
(脚本)一键部署redis任意版本 —— 筑梦之路