Difference Between malloc() and calloc() with Examples

Pre-requisite: Dynamic Memory Allocation in C using malloc(), calloc(), free() and realloc()

The name malloc and calloc() are library functions that allocate memory dynamically. It means that memory is allocated during runtime(execution of the program) from the heap segment.

Article Tags :
C
Practice Tags :