cputs

write a character string directly to the console

Synopsis:

#include <conio.h>
int cputs( const char *buf );

Description:

The cputs() function writes the character string pointed to by buf directly to the console using the putch() function. Unlike the puts() function, the carriage-return and line-feed characters are not appended to the string. The terminating null character is not written.

Returns:

0
Success
non-zero
An error occurred. When an error has occurred, errno contains a value indicating the type of error that has been detected.

See also:

errno, fputs(), putch(), puts()

Examples:

#include <conio.h>

void main()
  {
    char buffer[82];

    buffer[0] = 80;
    cgets( buffer );
    cputs( &buffer[2] );
    putch( '\r' );
    putch( '\n' );
  }

Classification:

WATCOM

Systems:

All (except DOS/PM)