标签:class color images src image clu span swap 作业
#include<stdio.h> void swap(int *a,int *b)//定义交换函数 { int num; num = *a; *a = *b; *b = num; } /** @ALMS */ int main(void) { int a=0,b=99,*p1,*p2; p1 = &a; p2 = &b; printf("%d %d\n",*p1,*p2);//输出转换前 swap(p1,p2);//传值交换 printf("%d %d\n",*p1,*p2);//输出转换后 return 0; }
总结:对于指针的取地址值赋地址值值符号&*不懂,只好挨个去试,不认真听课就这后果,i m a stupid student no why
标签:class color images src image clu span swap 作业
原文地址:http://www.cnblogs.com/2016024249-/p/6601698.html