C Language : Pointers

Difference between calloc() and malloc() is: , Difference between calloc() and malloc() is:

Difference between calloc() and malloc() is:




Solution
B. malloc() takes a single argument while calloc() needs two arguments



Explanation
The malloc() takes a single argument, while calloc() takess two. Second, malloc() does not initialize the memory allocated, while calloc() initializes the allocated memory to ZERO.Both malloc and calloc are used in C language for dynamic memory allocation they obtain blocks of memory dynamically.
CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Exam Quiz Website development Company in Allahabad