Difference between calloc and realloc | SoloLearn: Learn to code for FREE!


Difference between calloc and realloc

11/20/2019 4:16:19 AM


3 Answers

New Answer


This article explains it neatly. Go have a read: “C Programming Language: Functions — malloc(), calloc(), realloc(), and free()” by jraleman https://link.medium.com/eUqgDuNcL1


This link will gives your answer go through it https://www.geeksforgeeks.org/dynamic-memory-allocation-in-c-using-malloc-calloc-free-and-realloc/


calloc is used to get a chunk of memory from heap area.... Used for getting memory during runtime or dynamically.... Realloc is used to change the size or reallocate the memory which we get dynamically