Anonymous user
Hello world/Line printer: Difference between revisions
→{{header|C}}
Line 40:
=={{header|C}}==
Assuming that the line printer is attached to /dev/lp0
<lang C>#include <stdio.h>
int main()
{
FILE *lp;
printf("Hello world!\n");▼
lp = fopen("/dev/lp0","w");
fclose(lp);
return 0;
}</lang>
|