miki said:
hello,
I was asked this question during a job interview, and didn't know the answer.
could someone please help me with that?
the question was: "Which files are more suitable for working in C, ascii or
binary?"
"Both, and neither."
This cannot be answered without knowing what the files are to be used for.
Think of the C compiler itself, which is probably written in C. It takes
text source files and creates binary object files. (Though I suppose
that even this might be 'implementation dependent".) It doesn't make much
sense to use binary source files, and it makes even less sense to make
text object files. (Though again, this is a simplification, since the C
compilers I have used on *nix systems actually create text files of
assembler source code. Of course, this is then passed to the assembler
[probably written in C] which takes the text assembler source and then
creates the binary object file.)
Some files are naturally text format, and some are naturally binary, and
which type you use depends on the file's purpose, and not on C.
Are you sure you want to work for a place that thinks the question has an
answer? (Unless the question was meant to get you to thinking about the
concepts of text-vs-binary, and to give more than a simple answer. But,
what are the odss of that?)