開發平台(Platform): (Ex: Win10, Linux, ...)
xp
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
code block
問題(Question):
程式碼交換位置後 執行出現錯誤
餵入的資料(Input):
1234
程式碼(Code):(請善用置底文網頁, 記得排版)
#include <stdio.h>
#include <stdlib.h>
main()
{
char str1[]="";
char *str2="您輸入的字串如上";
printf("請輸入字串:");
fgets(str1,80,stdin);
printf("%s",str1);
printf("%s",str2);
}
以上程式碼 執行時 會出現錯誤