Basic and Advance C Question:

How can I change their mode to binary?

Tweet Share WhatsApp

Answer:

I'm writing a ``filter'' for binary files, but stdin and stdout are preopened as text streams. How can I change their mode to binary?

There is no standard way to do this. On Unix-like systems, there is no text/binary distinction, so there is no need to change the mode. Some MS-DOS compilers supply a setmode call. Otherwise, you're on your own.

Download C Programming PDF Read All 221 C Programming Questions
Previous QuestionNext Question
How can I read/write structures from/to data files?What is the difference between text and binary I/O?