What are the differences between malloc() and calloc()?

Showing Answers 1 - 5 of 5 Answers

Yogesh Panda

  • Sep 19th, 2005
 

the basic difference between malloc() & callocis that malloc() takes one arrugement and calloc takes two arrgumens.

  Was this answer useful?  Yes

yogeshpanda

  • Sep 19th, 2005
 

The basic difference between the malloc() and the calloc() is that malloc() takes one arrgument and the calloc() takes two arrguments.

  Was this answer useful?  Yes

reet_dhiman

  • Mar 16th, 2007
 

hey the above mentioned both reasons r same and correct .
but other than this there one minor difference between both that si with their default storage:
malloc() stores garbage values by default n calloc() contains all zeros by default

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions