home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
s
/
sep91.zip
/
9N09102A
< prev
next >
Wrap
Text File
|
1991-07-23
|
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);
}