home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_09_09
/
9n09102a
< prev
next >
Wrap
Text File
|
1991-07-22
|
475b
|
27 lines
/**
Copied and modified from June 1990 CUJ, p 71-72.
*/
#include <stdio.h>
void main()
{
FILE *file_printer;
int x, y, z;
x = 5;
y = 6;
z = x + y;
if ( (file_printer = fopen("LPT1", "w") ) == NULL)
{
printf ("unable to open file".\n");
exit(0);
}
fprintf(file_printer, "The answer is %10d.", z);
fflush(file_printer);
fclose (file_printer);
}