Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <stdio.h>
    int puts( const char *buf );
    #include <stdio.h>
    int _putws( const wchar_t *bufs );

Description:
    The puts function writes the character string pointed to by buf to the
    output stream designated by  stdout, and appends a new-line character to
    the output.  The terminating null character is not written.

    The _putws function is identical to puts except that it converts the
    wide character string specified by buf to a multibyte character string
    and writes it to the output stream.

Returns:
    The puts function returns a non-zero value if an error occurs otherwise,
    it returns zero.  When an error has occurred,  errno contains a value
    indicating the type of error that has been detected.

Example:
    #include <stdio.h>

    void main()
      {
        FILE *fp;
        char buffer[80];

        fp = freopen( "file", "r", stdin );
        while( gets( buffer ) != NULL ) {
            puts( buffer );
        }
        fclose( fp );
      }

Classification:
    puts is ANSI, _putws is not ANSI

Systems:
     puts - All, Netware

    _putws - All

See Also:
    fopen, fputc, fputchar, fputs, putc, putchar, ferror

See Also: ferror

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson