为什么输出的字符串后面有个四方块?
#include
#include
int main(){
FILE *in,*out;
char ch,infile[10],outfile[10];
printf("输入读入文件的名字:");
scanf("%s",infile);
printf("输入输出文件的名字:");
scanf("%s",outfile);
if((in=fopen(infile,"r"))==NULL){
printf("无法打开此文件\n");
exit(0);
}
if((out=fopen(outfile,"w"))==NULL){
printf("无法打开此文件\n");
exit(0);
}
while(!feof(in)){
ch=fgetc(in);
fputc(ch,out);
putchar(ch);
}
putchar('\n');
fclose(in);
fclose(out);
return 0;
}
而不是computer and c?
图片是一个常见的文件系统的图片,我们需要实现的只有单分区就好了,不那么复杂。
这张图就是一个最简单的文件系统,但是作业要求我们有inode和数据块的分配回收,所以我们得加上inode位示图和数据块的位示图。