1、puts函数是gets函数的输出版本,它把指定的字符串写到标准输出并在末尾添加一个换行符
1 #include2 #include 3 4 int main(int argc, char *argv[]) { 5 char msg[128]; 6 gets(msg); 7 puts(msg); 8 9 system("pause");10 return 0;11 }12 /*13 hi, puts.14 hi, puts.15 请按任意键继续. . .16 */
本文共 350 字,大约阅读时间需要 1 分钟。
1、puts函数是gets函数的输出版本,它把指定的字符串写到标准输出并在末尾添加一个换行符
1 #include2 #include 3 4 int main(int argc, char *argv[]) { 5 char msg[128]; 6 gets(msg); 7 puts(msg); 8 9 system("pause");10 return 0;11 }12 /*13 hi, puts.14 hi, puts.15 请按任意键继续. . .16 */
转载于:https://www.cnblogs.com/valuestack/p/puts.html