char ch[10]; fgets(ch, sizeof(ch), stdin); printf("ch = %s\n", ch); 转载于:https://www.cnblogs.com/mayichen0823/p/10164031.html