- #include <stdio.h>
- void value(int a, int b)
- {
- int temp = 0;
- temp = b;
- b = a;
- a = temp;
- }
- void adress(int *a,int *b)
- {
- int temp = 0;
- temp = *b;
- *b = *a;
- *a = temp;
- }
- int main()
- {
- int x = 10;
- int y = 11;
-
- value(x,y);
- printf("%d...%d",x,y);
- adress(x,y);
- printf("%d...%d",x,y);
- return 0;
- }
复制代码 |