The calloc function initialize the allocated memory with 0 but malloc don’t. So the memory which is allocated by the malloc has the garbage data. In another word you can say that calloc is equal to the combination of malloc and memeset.
See the below expression,
Note: If you don’t want to initialize the allocated memory with zero, It would be better to use malloc over calloc.