From what I remember, essentially, they both dynamically (while the program is running) allocate memory for your program, and the main difference is that calloc sets all the memory (that it allocates to your program) to zero's while malloc does not. So after calling malloc, the memory that was set aside for your program would still have whatever 0'1 and 1's were in the bits before, but for calloc, all those bits would be set to 0's.
Last edited by BestJewSinceJC; May 27th, 2009 at 4:57 am.
Reputation Points: 874
Solved Threads: 352
Posting Maven
Offline 2,758 posts
since Sep 2008