Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?

Answer Posted / md ajij

1.malloc() allocate one block of space in memory , argument
of the malloc is the size of the block.
where as calloc() allocate multiple blocks in the memory
,argument of the malloc() is the size of a block and number
of blocks.

2. malloc() takes garbage value at the initial time where
initial value of calloc() is zero.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can I write functions that take a variable number of arguments?

1074


How important is structure in life?

1082


What is the use of putchar function?

1055


What is sizeof array in c?

1046


Why double pointer is used in c?

1033


What is the size of structure in c?

1149


What is a dynamic array in c?

1152


Explain the difference between null pointer and void pointer.

1078


Do variables need to be initialized?

1036


What is the value of h?

1039


Explain what is the best way to comment out a section of code that contains comments?

1131


What are the features of c language?

1064


Why main function is special give two reasons?

1537


Explain how do you determine a file’s attributes?

1042


Do pointers need to be initialized?

1074