若有说明char s1[]=“the boy”,s2[]=“is headsome”;,则使用函数strcpy(s1,s2)后A.s1的内容不变 B.有可能导致数据错误 C.s1的内容更新为the boy is headsome D.s1的内容更新为is headsome 为什么?

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/29 15:02:46
若有说明chars1[]=“theboy”,s2[]=“isheadsome”;,则使用函数strcpy(s1,s2)后A.s1的内容不变B.有可能导致数据错误C.s1的内容更新为theboyishe

若有说明char s1[]=“the boy”,s2[]=“is headsome”;,则使用函数strcpy(s1,s2)后A.s1的内容不变 B.有可能导致数据错误 C.s1的内容更新为the boy is headsome D.s1的内容更新为is headsome 为什么?
若有说明char s1[]=“the boy”,s2[]=“is headsome”;,则使用函数strcpy(s1,s2)后
A.s1的内容不变
B.有可能导致数据错误
C.s1的内容更新为the boy is headsome
D.s1的内容更新为is headsome
为什么?

若有说明char s1[]=“the boy”,s2[]=“is headsome”;,则使用函数strcpy(s1,s2)后A.s1的内容不变 B.有可能导致数据错误 C.s1的内容更新为the boy is headsome D.s1的内容更新为is headsome 为什么?
因为strlen(s2) > strlen(s1) ; 你懂的,