[Csci551-talk] [Q] HW1 Question 3

John Heidemann johnh@ISI.EDU
Thu, 30 Jan 2003 13:01:05 -0800


On Wed, 29 Jan 2003 19:02:26 PST, JongAm Park wrote: 
>Hello.
>
>I just started the Question 3 of the HW1.
>However there is something I'd like to ask a question.
>
>It is said that the input is given.
>Could you tell me what format, aka, ASCII or binary, is it?
>I assume that it should be binary. Because Unix only support binary mode
>and it's meaningful when it's binary for processing.
>However, then how can I test my code? I can't write a binary code
>in to the stdio, if not generate the header. So, maybe it's ASCII.
>So, please let me know it.
>
>BTW, the fread doesn't return the size of data it reads. Hmmm..
>
>
>

Most network protocols and this assignment are in binary,
not ASCII.

But your statement that one can't read binary data from stdin is
incorrect (both under Unix and Windows, although in Windows you must
be careful about CR/NL translation).

   -John Heidemann