求助
zkm11 2003-10-09 11:57:11 #include <stdio.h>
#define x 12345678
long int fff(long int m)
{
long int t,*p1,*p2;
for(i=1;i<j;i++,j--)
{
t=*p1;
*p1=*p2;
*p2=t;
}
return(m);
}
main()
{long int n;
FILE *p;
if ((p=fopen("file1.txt","w"))==NULL)
{printf("this file can not open\n");
exit(0);
}
n=fff(x);
printf("%ld\n",n);
fprintf(p,"%ld\n",n);
}
编写一个函数fff,它的功能是将任意非负整数(如5678)倒序输出(8765)
注意:部分源程序已给出,请勿改动主函数main()和已给出的源程序,仅在fff函数中的花括号内填入你编写地若干语句