For the sake of learning C and understanding the difference between Binary Files and Text Files, I\'m attempting to write a string to file as both file types like so:
<
Both files are binary files. They're an exact copy of the data you sent to fwrite. Some broken operating systems have text files which are not binary; they have extra junk like \r\n replacing \n, or fixed-size line records, etc. POSIX forbids all of this. On any POSIX OS, text and binary mode are identical.
By the way, "wt" is not a valid mode argument to fopen. Text mode is default. The t modifier to request text mode is an extension of broken Windows implementations where binary is default but text mode is available by request.