Hey guys, quick question.
What exactly is the difference(benefit) of using calloc over malloc
They seem dreadfully similar to me.
p = (int *)calloc(5,sizeof(int)); // allocates 5 ints
q = (int *)malloc(5 * sizeof(int)); // allocates 5 ints gasp
So, what's the idea behind having the two different memory allocation functions?