cputs

Writes a specified character string directly to the current screen

Local Servers:blocking
Remote Servers:N/A
Classification:Other
Service:Device I/O

Syntax

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

Parameters

buf

(IN) Points to a character string.

Return Values

cputs returns a nonzero value if an error occurs. Otherwise, it returns a value of 0. When an error has occurred, errno is set.

Remarks

The carriage-return and line-feed characters are not appended to the string. The terminating NULL character is not written.

See Also

fputs (Single and Intra-File Services), putch

Example

  #include <nwconio.h>  
   
  main ()  
  {  
     char   buffer[82];  
     buffer[0]=80;  
     cgets (buffer);  
     cputs (&buffer[2] );  
     putch (’\r’);  
     putch (’\n’);  
  }