Some main and important difference b/n malloc and calloc are given below:
malloc is use for memory allocation and initialize garbage values. where as calloc is same as malloc but it initialize 0 value.
example:
// This allocats 200 ints, it doesn't initialize the memory:
int *m = malloc(200*sizeof(int));
// This, too, allocates 200 ints, but initializes the memory
// to zero:
int *c = calloc(200,sizeof(int));