Difference between calloc and realloc | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Difference between calloc and realloc

20th Nov 2019, 4:16 AM
Sumithra
Sumithra - avatar
3 Answers
+ 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
20th Nov 2019, 4:21 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
20th Nov 2019, 4:32 AM
Rohitman
Rohitman - avatar
+ 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
20th Nov 2019, 4:20 AM
Saurabh B
Saurabh B - avatar