当前位置:网站首页>兩個數相互替換
兩個數相互替換
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);
}
边栏推荐
- 用快解析内网穿透实现零成本自建网站
- Fast parsing intranet penetration helps enterprises quickly achieve collaborative office
- Is the account opening link of Huatai Securities with low commission safe?
- How to avoid arc generation—— Aafd fault arc detector solves the problem for you
- The waterfall flow layout demo2 (method 2) used by the uniapp wechat applet (copy and paste can be used without other processing)
- TS快速入门-函数
- Go step on the pit - no required module provides package: go mod file not found in current directory or any parent
- Enterprise application business scenarios, function addition and modification of C source code
- 海思3559万能平台搭建:YUV422的踩坑记录
- Summary of week 22-07-02
猜你喜欢

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

PMP certificate renewal process

Illustrated network: what is gateway load balancing protocol GLBP?

OpenHarmony资源管理详解

Build your own minecraft server with fast parsing

人脸识别5- insight-face-paddle-代码实战笔记

Every time I look at the interface documents of my colleagues, I get confused and have a lot of problems...

The input of uniapp is invalid except for numbers

电力运维云平台:开启电力系统“无人值班、少人值守”新模式

Robot reinforcement learning synergies between pushing and grassing with self supervised DRL (2018)
随机推荐
[Peking University] tensorflow2.0-1-opening
How long does it take to obtain a PMP certificate?
Chinese verification of JS regular expressions (turn)
业务场景功能的继续修改
Verilog tutorial (11) initial block in Verilog
如何有效对直流列头柜进行监测
Life is changeable, and the large intestine covers the small intestine. This time, I can really go home to see my daughter-in-law...
Illustrated network: what is gateway load balancing protocol GLBP?
【雅思阅读】王希伟阅读P4(matching2段落信息配对题【困难】)
企业公司项目开发好一部分基础功能,重要的事保存到线上第一a
XML的解析
圖解網絡:什麼是網關負載均衡協議GLBP?
股票账户佣金怎么调低,炒股佣金怎么调低网上开户安全吗
22-07-02周总结
Netcore3.1 JSON web token Middleware
公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
[IELTS reading] Wang Xiwei reading P3 (heading)
华为200万年薪聘请数据治理专家!背后的千亿市场值得关注
Paddleocr tutorial
如何报考PMP项目管理认证考试?