+ 1

What is the difference between calloc and realloc and malloc

19th Jun 2024, 2:04 PM
Gopisetti Bala Yamuna
Gopisetti Bala Yamuna - avatar
1 Réponse
0
- malloc: allocates a specified amount of memory but doesn't initialize it. - calloc: allocates memory for an array of elements and initializes all bytes to zero. - realloc: changes the size of an already allocated memory block, potentially moving it if the new size requires it.
25th Aug 2024, 9:52 PM
Neriya Bar-lev
Neriya Bar-lev - avatar