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
Differentiate between new and malloc(), delete and free() ?
#include
Write a program that accept anumber in words
Is there a built-in function in C that can be used for sorting data?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
What are the disadvantages of a shell structure?
What is nested structure with example?
Did c have any year 2000 problems?
what is uses of .net
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is assert and when would I use it?
Why do we use int main instead of void main in c?
How many types of arrays are there in c?
What are runtime error?
Explain output of printf("Hello World"-'A'+'B'); ?