home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_08_10
/
8n10086b
< prev
next >
Wrap
Text File
|
1990-07-22
|
531b
|
29 lines
*******Listing 3
/* Write to a printer -- the correct way */
#include <stdio.h>
function()
{
FILE *file_printer; /* pointer to a file */
int x, y, z;
x = 5;
y = y;
z = x + y;
/* open the printer */
file_printer = fopen ("PRN", "w");
/* print the line */
fprintf (file_printer, "The answer is %10d", z);
/* close the printer */
fclose (file_printer);
}
*********