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

+5

Difference between calloc and realloc

11/20/2019 4:16:19 AM

Sumithra

3 Answers

New Answer

+11

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

+10

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

+8

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