单选题 以下四个程序中不能对两个整型值进行交换的是______。
【正确答案】 C
【答案解析】[解析] main()
{ int*a=0, *b=0;
*a=10, *b=20; //有错误,a与b没有指向任何对象,但却给对象赋值。
swap(a, b); printf("%d%d/n", *a, *b);
}
swap(int*p, int*q)
{ int t;
t=*p; *p=*q; *q=t;
}