当前位置:网站首页>两个数相互替换
两个数相互替换
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);
}
边栏推荐
- [论文阅读] CarveMix: A Simple Data Augmentation Method for Brain Lesion Segmentation
- 雅思考试流程、需要具体注意些什么、怎么复习?
- Tester's algorithm interview question - find mode
- Basic points of the game setup of the points mall
- Enterprise application business scenarios, function addition and modification of C source code
- [paper reading] cavemix: a simple data augmentation method for brain vision segmentation
- Application of multi loop instrument in base station "switching to direct"
- It's too convenient. You can complete the code release and approval by nailing it!
- Acwing164. Accessibility Statistics (topological sorting +bitset)
- A new method for analyzing the trend chart of London Silver
猜你喜欢

XML的解析

【雅思阅读】王希伟阅读P4(matching1)

PMP certificate renewal process

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

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

Mit-6.824-lab4b-2022 (10000 word idea explanation - code construction)

圖解網絡:什麼是網關負載均衡協議GLBP?

Pytoch --- use pytoch to realize linknet for semantic segmentation
![P3304 [SDOI2013]直径(树的直径)](/img/5c/984675bf4517481f80f54657c6c7ad.png)
P3304 [SDOI2013]直径(树的直径)
随机推荐
Consolidated expression C case simple variable operation
What is the difference between port mapping and port forwarding
IT转测试岗,从迷茫到坚定我究竟付出了什么?
【雅思阅读】王希伟阅读P4(matching2段落信息配对题【困难】)
股票账户佣金怎么调低,炒股佣金怎么调低网上开户安全吗
P4408 [NOI2003] 逃学的小孩(树的直径)
The input of uniapp is invalid except for numbers
If you open an account of Huatai Securities by stock speculation, is it safe to open an account online?
Robot reinforcement learning synergies between pushing and grassing with self supervised DRL (2018)
Mit-6.824-lab4b-2022 (10000 word idea explanation - code construction)
The company needs to be monitored. How do ZABBIX and Prometheus choose? That's the right choice!
ORB(Oriented FAST and Rotated BRIEF)
Actual combat simulation │ JWT login authentication
"Xiaodeng" domain password policy enhancer in operation and maintenance
Best practice case of enterprise digital transformation: introduction and reference of cloud based digital platform system security measures
Skills in analyzing the trend chart of London Silver
Go step on the pit - no required module provides package: go mod file not found in current directory or any parent
Microservice
C语言中sizeof操作符的坑
uniapp微信小程序拿来即用的瀑布流布局demo2(方法二)(复制粘贴即可使用,无需做其他处理)