Basic and Advance C Question:

Download Job Interview Questions and Answers PDF

How can I direct output to the printer?

C Programming Interview Question
C Programming Interview Question

Answer:

Under Unix, either use popen to write to the lp or lpr program, or perhaps open a special file like /dev/lp. Under MS-DOS, write to the (nonstandard) predefined stdio stream stdprn, or open the special files PRN or LPT1. Under some circumstances, another (and perhaps the only) possibility is to use a window manager's screen-capture function, and print the resulting bitmap.

Download C Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How do I send escape sequences to control a terminal or other device?How can I do serial comm port I O?