When I open a pdf file with binary format, what is the difference between opening it without b in fopen(,)?
Will Using char array to cap all the array be different from using char* array to cap all the array?
When I open a pdf file with binary format, what is the difference between opening it without b in fopen(,)?
Will Using char array to cap all the array be different from using char* array to cap all the array?
It's system specific, eg, on POSIX systems (such as linux), there is no difference.
If it does distinguish, the binary stream is one that should be, byte for byte, identical to the data read. The text stream may be modified (eg, replacing '\n' with '\r\n').Originally Posted by C99 draft standard
A char array would have the data in a single array. A char* array (array of pointers to char arrays) might be breaking it into lines, with each line in a char array.
Last edited by MK27; 10-24-2011 at 11:49 AM.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge