Binary or Ascii Text?



Hi, everyone. I got a question. How can I identify whether a file is a
binary file or an ascii text file? For instance, I wrote a piece of
code and saved as "Test.c". I knew it was an ascii text file. Then
after compilation, I got a "Test" file and it was a binary executable
file. The problem is, I know the type of those two files in my mind
because I executed the process of compilation, but how can I make the
computer know the type of a given file by writing code in C? Files are
all save as 0's and 1's. What's the difference?

Please help me, thanks.

.



Relevant Pages

  • Re: Binary or Ascii Text?
    ... I knew it was an ascii text file. ... after compilation, I got a "Test" file and it was a binary executable ... computer know the type of a given file by writing code in C? ... It removes the CR from the CRLF pair and ignores any trailing ^Z character. ...
    (comp.lang.c)
  • Re: Binary or Ascii Text?
    ... binary file or an ascii text file? ... I knew it was an ascii text file. ... after compilation, I got a "Test" file and it was a binary executable ... that happens to consist of printable characters -- and what's ...
    (comp.lang.c)
  • Re: Binary or Ascii Text?
    ... Claude Yih wrote: ... I knew it was an ascii text file. ... after compilation, I got a "Test" file and it was a binary executable ... computer know the type of a given file by writing code in C? ...
    (comp.lang.c)
  • Re: Character set conversoin headaches
    ... I am attempting to transfer a binary file for my pc to a uss file and ... ascii they get translated to '0D0A'. ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • Re: How to read a Hexadecimal file ?
    ... That is NOT hexadeciaml data ... it's not data represented in ASCII. ... binary file, neither ASCII nor hexadecimal. ... character set), ...
    (comp.lang.c)