摘要:
最近无聊写的一段小程序#include <stdio.h>void swap(int *px, int *py);int main() { int x = 1, y = 2; printf("x=%d, y=%d/n", x, y); swap(&x, &y); printf("x=%d, y=%d/n", x, y); return 0;}void swap(int *px, int *py) { *px = *px + *py; *py = *px - *py; *px = *px - *py;}真是无聊! 阅读全文