下列给定程序中函数fun的功能是:实现两个变量值的交换,规定不允许增加语句和表达式。
例如,变量a中的值原为8,b中的值原为3,程序运行后a中的值为3,b中的值为8。
请改正程序中的错误,使它得出正确的结果。
注意:不要改动main函数,不得增行或删行,也不得更改程序的结构!
试题程序:
#include<stdlib.h>
#include<conio.h>
#include<stdio.h>
int fun(int*x,int y)
int t:
/*********found*********/
t=x;x=y;
/*********found*********/
return(y);
void main()
int a=3,b=8;
system("CLS");
printf("%d%d\n",a,b);
b=fun(&a,b);
printf("%d%d\n",a,b);