C puts()

The puts() functions writes the string pointed to by str to the standard output device. The null terminator is translated to a newline.

puts() Syntax

int puts(const char *str);

The puts() returns a non-negative value if successful, otherwise returns EOF on failure

puts() Example

Following c program writes the string this is an example to the stdout

void main()
	char str[80];
	strcpy(str, "this is an example");

C Online Test

« Previous Function Next Function »

Like/Share Us on Facebook 😋