cprintf

Writes output directly to the current application screen under format control

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

Syntax

  #include <nwconio.h>  
   
  int cprintf  (  
     const char   *format,   
     ...);
  

Parameters

format

(IN) Points to the format specification string.

Return Values

Returns the number of characters written.

Remarks

The cprintf function outputs the formatted data directly to the console screen.

See Also

NWcprintf and printf and vfprintf in Single and Intra-File Services

Example

  #include <nwconio.h>  
  #include <stdio.h>  
   
  main ()  
  {  
     char *weekday, *month;  
     int day, year;  
     weekday="Saturday";  
     month="April";  
     day=18;  
     year=1991;  
     cprintf ("%s, %s %d, %d\n", weekday, month, day, year);  
  }
  

produces the following:

  Saturday, April 18, 1991