参考资料: scanf: "%[^\n]" skips the 2nd input but " %[^\n]" does ... (3)限制输入字符串的长度,预留结尾的NUL: char str[10] scanf("%9s", str);
確定! 回上一頁