Hello world/Line printer: Difference between revisions
Content added Content deleted
Line 40: | Line 40: | ||
=={{header|C}}== |
=={{header|C}}== |
||
Assuming that the line printer is attached to /dev/lp0 |
|||
{{incorrect|C|It prints to standard out rather than to a line printer.}} |
|||
<lang C>#include <stdio.h> |
<lang C>#include <stdio.h> |
||
int main() |
int main() |
||
{ |
{ |
||
FILE *lp; |
|||
⚫ | |||
lp = fopen("/dev/lp0","w"); |
|||
⚫ | |||
fclose(lp); |
|||
return 0; |
return 0; |
||
}</lang> |
}</lang> |