Computer Science, asked by h2e0jaajainabindeept, 1 year ago

difference between malloc and calloc

Answers

Answered by kumarishiwangi
2
There are two major differences between malloc and calloc in C programming language:first,in the number of argument.The malloc() takes a single argument while calloc() takes two.Second,malloc doesn't initialize the memory allocated,while calloc initialize the allocated memory to ZERO.
Answered by PK78000
1
The malloc takes single argument. It does not initialize the memory allocated.
                         The calloc takes two argument. It does initializes the allocated memory to Zero.
Similar questions