帮忙看以下代码
swap(int *p1, int *p2){
int temp;
temp = *p1;
*p1 = *p2;
*p2 = temp;
}
main()
{
int a, b;
int *pointer1, *pointer2;
scanf("%d,%d", &a, &b);
pointer1 = &a;
pointer2 = &b;
swap(pointer1, pointer2);
printf("\nThe result is :%d,%d\n", a, b);
getch();
}
我用的是Microsoft Visual C++ 6.0。输入12 13。结果却是-858993460 12