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

How many levels of indirection in pointers can you have in a single declaration?

1092


What is property type c?

1092


What is identifier in c?

1015


What are the two forms of #include directive?

1170


What are the advantage of c language?

1054


What is typedf?

1126


What is a macro, and explain how do you use it?

1082


When is a null pointer used?

1117


Why is c still so popular?

1050


What is a const pointer?

1128


What is substring in c?

1207


Which header file should you include if you are to develop a function which can accept variable number of arguments?

1405


Explain 'bus error'?

1099


Is c compiled or interpreted?

1194


What is an auto keyword in c?

1099