why do i have to open a file in binary mode to write in it in c?

Posted by mekasperasky on Stack Overflow See other posts from Stack Overflow or by mekasperasky
Published on 2010-04-24T09:13:37Z Indexed on 2010/04/24 9:23 UTC
Read the original article Hit count: 266

Filed under:
fprintf(file, "%d %d %d", array[0], array[1], array[2]);

for this statement to work i have to open the file in 'wb' mode rather than 'w' mode . How does a binary mode make the syntax work?

© Stack Overflow or respective owner

Related posts about c