You are here : Cstdio.hputs

puts() - stdio.h

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