Thread: [Starter Question] Difference between Binary value and normal value

  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    10

    [Starter Question] Difference between Binary value and normal value

    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?

  2. #2
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    It's system specific, eg, on POSIX systems (such as linux), there is no difference.

    Quote Originally Posted by C99 draft standard
    An implementation need not distinguish between text streams and binary streams.
    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').

    Quote Originally Posted by exclusive View Post
    Will Using char array to cap all the array be different from using char* array to cap all the array?
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting normal between two angles (Logical question)
    By BlueGooGames in forum C Programming
    Replies: 15
    Last Post: 01-16-2011, 06:47 PM
  2. difference between variables and normal text
    By kocmohabt33 in forum C++ Programming
    Replies: 9
    Last Post: 09-28-2010, 01:24 PM
  3. Normal maps: Get normal x/y/z from color
    By Devils Child in forum Game Programming
    Replies: 2
    Last Post: 08-09-2009, 12:01 PM
  4. Not the normal looping question...
    By JKI in forum C++ Programming
    Replies: 12
    Last Post: 10-18-2003, 06:02 PM
  5. difference between register int and normal int
    By GanglyLamb in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 02-25-2003, 04:01 PM