c语言中puts的用法
c语言中puts的用法的用法你知道吗?下面小编就跟你们详细介绍下c语言中puts的用法的用法,希望对你们有用。
c语言中puts的用法的用法如下:
puts就是输出字符串啊。
int puts(
const char* string
);
MSDN的例子
/* PUTS.C: This program uses puts
* to write a string to stdout.
*/
include<stdio.h>
void main( void )
{
puts( "Hello world from puts!" );
}
运行结果就是
Hello world from puts!
你要输出换行的话,就用 puts( "" );
用法很简单啊,就是把一个C样式的字符串当参数传过去。
//-----------------------------------------
我刚刚试过了
puts( "" )的确可以起到换行的作用。
The puts function writes string to the standard output stream stdout, replacing the string's terminating null character ('