题目内容
(请给出正确答案)
[单选题]
标准库函数fgets(s,n,f)的功能是()。
A.从文件f中读取长度小于n的字符串存入s中
B.从文件f中读取长度为n的字符串存入s中
C.从文件f中读取长度为n-1的字符串存入s中
D.从文件f中读取n个字符串存入s中
答案
查看答案
A.从文件f中读取长度小于n的字符串存入s中
B.从文件f中读取长度为n的字符串存入s中
C.从文件f中读取长度为n-1的字符串存入s中
D.从文件f中读取n个字符串存入s中
第3题
#include <string.h> void f(char *s,char *t) {char k; k=*s; *s=*t;*t=k; s++;t--; if(*s)f(s,t); } main() {char str[10]="abcdefg",*p; p=str+strlen(str)/2+1; f(p,p-2); printf("%s\n",str); } 程序运行后的输出结果是()。
A.gfedcba
B.gbcdefa
C.abedcfg
D.abcdefg
第9题
A.strcpy(s4, s1);"
B.strcpy(s3, s1);
C.strcpy(s2, s4);
D.strcpy(s1, s4);
第11题
A.f->next=s; f=s;
B.r->next=s; r=s;
C.s->next=r; r=s;
D.s->next=f; f=s;