皮皮学,免费搜题
登录
搜题
【简答题】
填空完成下面程序。 给定程序的功能是:从键盘输入若干行文本(每行不超过 80 个字符),写到文件 myfile4.txt 中,用 - 1 作为字符串输入结束的标志。然后将文件的内容读出显示在屏幕上。文件的读写分别由自定义函数 ReadText 和 WriteText 实现。 #include #include #include void WriteText(FILE *); void ReadText(FILE *); main() {FILE *fp; if((fp=fopen("myfile4.txt","w"))==NULL) {printf(" open fail!!\n"); exit(0);} WriteText(fp); fclose(fp); if((fp=fopen("myfile4.txt","r"))==NULL) {printf(" open fail!!\n"); exit(0);} ReadText(fp); fclose(fp); } void WriteText(FILE ) {char str[81]; printf("\nEnter string with -1 to end :\n"); gets(str); while(strcmp(str,"-1")!=0) { fputs( ,fw); fputs("\n",fw); gets(str); } } void ReadText(FILE *fr) {char str[81]; printf("\nRead file and output to screen :\n"); fgets(str,81,fr); while(!feof(fr)) { printf("%s",str); fgets( ,81,fr); } }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】门由一侧向另一侧开关的门称为 。
A.
中分式门
B.
旁开式门
C.
直分式门
【单选题】用革兰染色法染色,革兰阴性菌染成
A.
紫色
B.
蓝色
C.
红色
D.
黄色
【单选题】The author thinks that the two students should ______.
A.
give up their college education
B.
learn from other students
C.
feel happy because they are in college
D.
try hard before giving up
【单选题】As a member of the Youth League, you should _________ other students. [     ]
A.
give an example of
B.
set an example to
C.
make an example for
D.
take an example for
【单选题】It is seldom necessary for Sir David Willcocks to recommend that students should give up music because______.
A.
students may tell those who have no talent to give up music
B.
he thinks that it is important for everyone to get training in music
C.
they realize themselves what their real standard is
D.
students won't follow his advice
【单选题】______ strong-minded the teachers are, they should give their students enough time to share their ideas in class.
A.
However
B.
Whatever
C.
No matter
D.
Although
【单选题】幼儿初期,儿童的言语具有很明显的( ),并要以表情、手势为辅助。
A.
连贯性
B.
流畅性
C.
情境性
D.
形象性
【单选题】下列哪项是维生素D缺乏性佝偻病骨样组织堆积的表现
A.
鸡胸
B.
O型腿
C.
手镯征
D.
肋缘外翻
E.
颅骨有乒乓球感
【判断题】用革兰染色法染色,革兰阴性菌呈紫色,革兰阳性菌呈红色。
A.
正确
B.
错误
【单选题】用革兰染色法染色,革兰阴性菌染成()
A.
紫色
B.
蓝色
C.
红色
D.
黄色
E.
灰色
相关题目: