Answer Posted / vara
There are two differences.
1) is the number of arguments. Malloc() takes a single
argument (memory required in bytes), while calloc() needs
two arguments (number of variables to allocate memory, size
in bytes of a single variable).
2)malloc() does not initialize the memory allocated, while
calloc() initializes the allocated memory to ZERO.
| Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
What is the need of structure in c?
What are the difference between a free-standing and a hosted environment?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
What is difference between && and & in c?
How do you redirect a standard stream?
Write a program to print factorial of given number without using recursion?
What is a good way to implement complex numbers in c?
What is FIFO?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
Explain how do you generate random numbers in c?
What is the difference between exit() and _exit() function?
What are the functions to open and close the file in c language?
Write a program to generate random numbers in c?
What is typedef example?
I came across some code that puts a (void) cast before each call to printf. Why?