C 语言指针理解
C 語言指針理解
#include<stdio.h>int main(){int *p1,*p2,*p,a,b;printf("please enter two integer numbers");scanf("%d,%d",&a,&b);p1=&a;p2=&b;if (a<b){p=p1;p1=p2;p2=p;}printf("a=%d,b=%d\n",a,b);printf("max=%d,min=%d\n",*p1,*p2);return 0;} luogan@luogan-Lenovo-G470:~/lg/temp/c數據結構與算法$ gcc ping.c luogan@luogan-Lenovo-G470:~/lg/temp/c數據結構與算法$ ./a.out please enter two integer numbers3,5 a=3,b=5 max=5,min=3posted on 2018-07-28 22:35 luoganttcc 閱讀(...) 評論(...) 編輯 收藏
總結
- 上一篇: python redis 消息队列
- 下一篇: 链表学习(一)静态链表的构造