puts函数

1、puts函数是gets函数的输出版本,它把指定的字符串写到标准输出并在末尾添加一个换行符

 1 #include <stdio.h>
 2 #include <stdlib.h>
 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 */

 

posted @ 2017-08-10 13:19  valuestack  阅读(345)  评论(0)    收藏  举报