当前位置:网站首页>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);
}
边栏推荐
- How to do the project of computer remote company in foreign Internet?
- Five papers recommended for the new development of convolutional neural network in deep learning
- 22-07-02周总结
- Actual combat simulation │ JWT login authentication
- GDB common commands
- Upload avatar on uniapp
- Microservice
- [IELTS reading] Wang Xiwei reading P4 (matching1)
- (脚本)一键部署redis任意版本 —— 筑梦之路
- 巩固表达式C# 案例简单变量运算
猜你喜欢

Application of multi loop instrument in base station "switching to direct"

Build your own minecraft server with fast parsing

机器人强化学习——Learning Synergies between Pushing and Grasping with Self-supervised DRL (2018)

【selenium自动化】常用注解

2022.07.03(LC_6108_解密消息)

多回路仪表在基站“转改直”方面的应用

Detailed explanation of openharmony resource management

How long does it take to obtain a PMP certificate?

JS how to realize array to tree

初识ROS
随机推荐
ORB(Oriented FAST and Rotated BRIEF)
【北京大学】Tensorflow2.0-1-开篇
Acrel-EMS综合能效平台在校园建设的意义
A new method for analyzing the trend chart of London Silver
如何避免电弧产生?—— AAFD故障电弧探测器为您解决
人脸识别5- insight-face-paddle-代码实战笔记
P4408 [noi2003] truant children (tree diameter)
Advanced template
如何在外地外网电脑远程公司项目?
【雅思阅读】王希伟阅读P4(matching2段落信息配对题【困难】)
Enterprise application business scenarios, function addition and modification of C source code
如何有效对直流列头柜进行监测
The pit of sizeof operator in C language
青海省国家湿地公园功能区划数数据、全国湿地沼泽分布数据、全国省市县自然保护区
Jar batch management gadget
[monitoring] ZABBIX
Significance of acrel EMS integrated energy efficiency platform in campus construction
机器人强化学习——Learning Synergies between Pushing and Grasping with Self-supervised DRL (2018)
Mit-6.824-lab4b-2022 (10000 word idea explanation - code construction)
abc 258 G - Triangle(bitset)