為什么運(yùn)行成功,輸入錯(cuò)誤
#include <stdio.h>
#include <string.h>
int main()
{
? ? char s1[100]="";
? ? char s2[]="我愛,";
? ? char s3[]="慕課網(wǎng)";
? ? /*在以下補(bǔ)全代碼*/
? ? strcat(s2,s3);
? ? strcpy(s1,s2);
? ??
? ? printf("%s\n",s1);
? ? return 0;? ??
}
2022-10-19
結(jié)果是完全沒問題的,只不過你沒有按照答案設(shè)定的思想來,而是創(chuàng)新了一種方法,答案只認(rèn)識自己的想法,所以給你錯(cuò)誤,你是沒問題的。
2022-05-11
#include <stdio.h>
#include <string.h>
int main()
{
? ? char s1[100]="";
? ? char s2[]="我愛,";
? ? char s3[]="慕課網(wǎng)";
? ? strcpy(s1,s2);
? ? strcat(s1,s3);
?printf("%s\n",s1);
? ? return 0;? ??
}