Function puts () in C
The function int puts (const char * str) in the standard C library writes a str string to stdout (not writing null characters). A newline character (new line) is appended to the output.
The function int puts (const char * str) in the standard C library writes a str string to stdout (not writing null characters). A newline character (new line) is appended to the output.
Declaring the function puts () in C
Here is the declaration for function puts () in C:
int puts ( const char * str )
Parameters
str - This is the string to be written.
Returns the value
If successful, this function returns a non-negative value. If there is an error, the function returns EOF.
For example
Program C then illustrates the usage of functions puts () in C:
#include #include int main () { char str1 [ 15 ]; char str2 [ 15 ]; strcpy ( str1 , "QTMteam" ); strcpy ( str2 , "xinchaocacban" ); puts ( str1 ); puts ( str2 ); return ( 0 ); }
Compile and run the above C program to see the results.
According to Tutorialspoint
Previous lesson: putchar () function in C
Next lesson: Function ungetc () in C
5 ★ | 2 Vote
You should read it
Maybe you are interested
Difference between function and formula in Excel
8 little-known Excel functions that can save you a lot of work
How to use the NORMDIST function in Excel - Function that returns the distribution in Excel
Date functions in Excel, DAY, WEEKDAY, MONTH
How to use the SUMIF function in Excel to calculate the sum based on conditions
How to use the Round function in Excel to round numbers and process data