You are here : cpp0puts

puts() - 0

The C library function int puts(const char *str) writes a string to stdout up to but not including the null character. A newline character is appended to the output.


Syntax

int puts(const char *str)


Example

#include <stdio.h>
#include <string.h>

int main()
{
   char str1[15];
   char str2[15];

   strcpy(str1, "tutorialspoint");
   strcpy(str2, "compileonline");

   puts(str1);
   puts(str2);
   
   return(0);
}


Output / Return Value

output


Limitations


Alternatives / See Also


Reference

reference