数组遍历

#include<stdio.h>
  
  void swop(int *x, int *y)
  {       
          int t; 
          t = *x;
          *x = *y;
          *y = t;
  }
  int main(void)
  {       
         int a = 3;
         int b = 4;
         int *x = &a;
         int *y = &b;
         swop(x,y);
         printf("%d %d",*x,*y);

        return 0;
 }

posted on 2017-03-18 19:48  曾祥刚  阅读(71)  评论(0编辑  收藏  举报

导航