#include"stdio.h"
#include"stdlib.h"
main()
{
FILE *p1,*p2;
int a[10],i,j,temp;
if((p1=fopen("E:\\in.txt","r"))==NULL)
{
printf("cannot open file\n");
exit(0);
}
if((p2=fopen("E:\\out.txt","w"))==NULL)
{
printf("cannot open file\n");
exit(0);
}
for(i=0;i<10;i++)
fscanf(p1,"%d",&a[i]);
for(i=0;i<10;i++)
{
for(j=0;j<10-i;j++)
if(a[j]>a[j+1])
temp=a[j+1];
a[j+1]=a[j];
a[j]=temp;
}
for(i=0;i<10;i++)
fprintf(p2,"%d",a[i]);
}
运行的时候说Debug Assertion Failed怎么回事?