关于c语言的,下面这个程序哪错了?#include "stdio.h" #include "s关于c语言的,下面这个程序哪错了?#include "stdio.h"#include "stdlib.h"int main(){\x05FILE *p1,*p2,*p3,*p;\x05char ch,c1,c2,c3;\x05p1=fopen("w1","r+");\x05p2=fope
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/29 22:07:29
![关于c语言的,下面这个程序哪错了?#include](/uploads/image/z/14629775-23-5.jpg?t=%E5%85%B3%E4%BA%8Ec%E8%AF%AD%E8%A8%80%E7%9A%84%2C%E4%B8%8B%E9%9D%A2%E8%BF%99%E4%B8%AA%E7%A8%8B%E5%BA%8F%E5%93%AA%E9%94%99%E4%BA%86%3F%23include+%22stdio.h%22+%23include+%22s%E5%85%B3%E4%BA%8Ec%E8%AF%AD%E8%A8%80%E7%9A%84%2C%E4%B8%8B%E9%9D%A2%E8%BF%99%E4%B8%AA%E7%A8%8B%E5%BA%8F%E5%93%AA%E9%94%99%E4%BA%86%3F%23include+%22stdio.h%22%23include+%22stdlib.h%22int+main%28%29%7B%5Cx05FILE+%2Ap1%2C%2Ap2%2C%2Ap3%2C%2Ap%3B%5Cx05char+ch%2Cc1%2Cc2%2Cc3%EF%BC%9B%5Cx05p1%3Dfopen%28%22w1%22%2C%22r%2B%22%29%3B%5Cx05p2%3Dfope)
关于c语言的,下面这个程序哪错了?#include "stdio.h" #include "s关于c语言的,下面这个程序哪错了?#include "stdio.h"#include "stdlib.h"int main(){\x05FILE *p1,*p2,*p3,*p;\x05char ch,c1,c2,c3;\x05p1=fopen("w1","r+");\x05p2=fope
关于c语言的,下面这个程序哪错了?#include "stdio.h" #include "s
关于c语言的,下面这个程序哪错了?
#include "stdio.h"
#include "stdlib.h"
int main()
{
\x05FILE *p1,*p2,*p3,*p;
\x05char ch,c1,c2,c3;
\x05p1=fopen("w1","r+");
\x05p2=fopen("w2","r+");
\x05p3=fopen("w3","r+");
\x05p=fopen("w","w+");
\x05while feof(p1))
\x05{
\x05\x05c1=fgetc(p1);
\x05\x05fputc(ch,p);
\x05\x05}
\x05\x05while feof(p2))
\x05{
\x05\x05c2=fgetc(p2);
\x05\x05fputc(ch,p);
\x05\x05}
\x05\x05while feof(p3))
\x05{
\x05\x05c3=fgetc(p3);
\x05\x05fputc(ch,p);
\x05\x05}
return 0;
}
关于c语言的,下面这个程序哪错了?#include "stdio.h" #include "s关于c语言的,下面这个程序哪错了?#include "stdio.h"#include "stdlib.h"int main(){\x05FILE *p1,*p2,*p3,*p;\x05char ch,c1,c2,c3;\x05p1=fopen("w1","r+");\x05p2=fope
请注意你fputc里面用的是ch,但是你程序里ch从来都没有赋过值.请把第一个while循环fputc中的ch改为c1,第二个循环c2,以此类推即可改正错误.写程序的时候注意理解程序的每一步,