当前位置:网站首页>兩個數相互替換
兩個數相互替換
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);
}
边栏推荐
- Expand your kubecl function
- Hong Kong Jewelry tycoon, 2.2 billion "bargain hunting" Giordano
- The input of uniapp is invalid except for numbers
- How to avoid arc generation—— Aafd fault arc detector solves the problem for you
- Using the uniapp rich text editor
- Verilog tutorial (11) initial block in Verilog
- 实战模拟│JWT 登录认证
- Réseau graphique: Qu'est - ce que le Protocole d'équilibrage de charge de passerelle glbp?
- 45 year old professor, she threw two super unicorns
- 业务实现-日志写到同一个行数据里面
猜你喜欢

The waterfall flow layout demo2 (method 2) used by the uniapp wechat applet (copy and paste can be used without other processing)

Parsing of XML

公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!

如何报考PMP项目管理认证考试?

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

Microservice

Build your own minecraft server with fast parsing

端口映射和端口转发区别是什么

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

How to do the project of computer remote company in foreign Internet?
随机推荐
机器人强化学习——Learning Synergies between Pushing and Grasping with Self-supervised DRL (2018)
js如何实现数组转树
[paper reading] cavemix: a simple data augmentation method for brain vision segmentation
How to save your code works quickly to better protect your labor achievements
Continuous modification of business scenario functions
Design of emergency lighting evacuation indication system for urban rail transit station
Date time type and format in MySQL
Combien de temps faut - il pour obtenir un certificat PMP?
[论文阅读] CarveMix: A Simple Data Augmentation Method for Brain Lesion Segmentation
城市轨道交通站应急照明疏散指示系统设计
挖财学院开户安全的吗?开户怎么开?
快解析——好用的内网安全软件
The pit of sizeof operator in C language
Build your own minecraft server with fast parsing
打新债开户注册安全吗?有没有风险的?靠谱吗?
[IELTS reading] Wang Xiwei reads P4 (matching2 paragraph information matching question [difficult])
lambda表达式
使用快解析搭建自己的minecraft服务器
《论文笔记》Multi-UAV Collaborative Monocular SLAM
人生无常,大肠包小肠, 这次真的可以回家看媳妇去了。。。