已知有声明:char s[20]="Hello"; ,在程序运行过程中若要想使数组s中的内容修改为"Good",则以下语句能够实现此功能的是().
A.strcat(s,"Good");
B.s[20]="Good";
C.strcpy(s,"Good");
D.s="Good";
- · 有3位网友选择 B,占比37.5%
- · 有2位网友选择 C,占比25%
- · 有2位网友选择 A,占比25%
- · 有1位网友选择 D,占比12.5%
A.strcat(s,"Good");
B.s[20]="Good";
C.strcpy(s,"Good");
D.s="Good";
A.1 2
B.123 0
C.1 23
D.0 0
A、true
B、false
C、hello
D、he
A、strcpy(s2, ptr);
B、ptr = s2;
C、ptr = ptr+10;
D、*ptr = *s2;
A.3
B.8
C.4
D.9
#include
main()
{ FILE *f;
f=fopen(“filea.txt”,”w”);
fprintf(f,”abc”);
fclose(f);
}
若文本文件filea.txt中原有内容为:hello,则运行以上程序后,文件filea.txt中的内容为
A) helloabc B)abclo C)abc D)abchello
#include
voidmain()
{FILE*f;
f=fopen("filea.txt","w");
fprintf(f,"abe");
fclose(f);
}
若文本文件filea.txt中原有内容hell0,则运行以上程序后,文件Iilea.txt中的内容为()。
A.helloabe
B.abclo
C.abe
D.abchello
#include$amp;struct stu { int num;char name[10];int age;};$br>
void fun(struct stu*p)
{ printf("%s\n",(*p).name);}
main
{ struct stu students[3]={{9801,"Zhang".20}, {9802,"Wang",19},{9803,"Zhao",1 8}}
fun(students+2); }
输出的结果是()。
A.Zhang
B.Zhao
C.Wang
D.18
A、'o'
B、'\0'
C、不确定的值
D、'o'的地址
为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!