< Back to Introduction | Forward to File Open Modes >
In order to test how C handles reading text files, I followed these steps:
Create 10 delimited text files all containing the same data,
but with different line terminators.
Some of these files are properly formatted for the DOS,
Unix, or Macintosh
operating systems, and some are malformed.
Write a C program to read these text files from disk
and output what was actually read.
The program read each file six times using two different
file open modes and three different
read functions. In addition, the program was
compiled and run in the following environments:
Microsoft Visual C++ version 6.0 on a DOS/Windows PC.
Borland C++ version 4.52 on a DOS/Windows PC.
GNU 'gcc' version 220.127.116.11 on a Linux computer.
(I do not have access to a Macintosh or a Macintosh C compiler, so the program
was not tested on a Mac.)
Do the arithmetic, and you'll see that this produced 180 output files! (And if
I had a Mac compiler, there would be 240.) They're all here.
< Back to Introduction | ^ Up to Top | Forward to File Open Modes >