文章详情
时间:2010-06-24 来源:hnrainll
#include <stdio.h> #include <stdlib.h> void swap(int *x, int *y); int main(int argc, char *argv[]) { int i, j; i = 12; j = 36; printf("i and j before swapping: %d %d\n", i, j); swap(&i, &j); printf("i and j after swapping: %d %d\n", i, j); system("pause"); return 0; } void swap (int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; }
辰域智控app
网医联盟app
汇丰汇选App
1970-01-01