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...

difference between malloc and calloc

Answer Posted / namita

1-memory allocated by malloc contains garbage value.But
memory allocated by calloc is initialised to zero.

2-malloc takes only one argument which indicates the size
to be allocated.But calloc takes two arguments.First
argument indicates the number of blocks to be allocated
where as the second argument indicates the size of the
block.

Is This Answer Correct ?    35 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you define a function?

1024


What is array of pointers to string?

1068


What does %c mean in c?

1082


Are enumerations really portable?

1025


Which node is more powerful and can handle local information processing or graphics processing?

1318


What is the use of extern in c?

1092


How do you construct an increment statement or decrement statement in C?

1230


How can I remove the leading spaces from a string?

1158


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2176


Is c still used?

1047


What is the difference between abs() and fabs() functions?

1120


Why do we use null pointer?

1061


What are derived data types in c?

1085


What are logical errors and how does it differ from syntax errors?

1299


What are the advantages of c language?

1091