swap +指针
来源:互联网 发布:手机订票软件 编辑:程序博客网 时间:2024/06/05 06:28
#include <stdio.h>
#include <stdlib.h>
void swap(int *a,int *b) //访问不同地址 ,用指针
{
int t=*b;
*b=*a;
*a=t;
}
int main()
{
int a=5;
int b=6;
swap(&a,&b);
printf("a=%d b=%d",a,b);
return 0;
}
#include <stdlib.h>
void swap(int *a,int *b) //访问不同地址 ,用指针
{
int t=*b;
*b=*a;
*a=t;
}
int main()
{
int a=5;
int b=6;
swap(&a,&b);
printf("a=%d b=%d",a,b);
return 0;
}
0 0
- 指针-----swap
- 指针-----swap
- swap +指针
- swap函数(指针)
- swap()引起的指针思考
- 关于指针与swap函数
- swap关于指针的使用
- [C++]Swap 整数交换;指针
- C语言 指针应用-swap()
- swap两个int指针指向的数
- 关于SWAP函数举例,指针实例
- 程序笔试题-strcpy,swap,指针数组和数组指针
- swap
- swap
- swap
- swap
- swap
- swap
- POJ 3349 哈希一维搜索降二维
- MySQL语句操作(⊙)
- 557. Reverse Words in a String III
- Uva-11768 Lattice Point or Not(欧扩)
- iOS实例——依赖关系的分类展现列表
- swap +指针
- MySQL配置远程访问
- linux下孤儿进程和僵尸进程
- python搭建简易HTTPServer服务
- C++ Primer 右值引用和move语义
- C++远航之封装篇——数据的封装
- 动态规划—05吃糖果
- 【注解( Annotation )】注解的概念及其使用方式
- 动态规划―买书