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 / arshad

1.
calloc function takes two argument while malloc takes only 1
2.
by default memory allocated by malloc contains garbage values
whereas that allocated by calloc contains all zero.

Is This Answer Correct ?    49 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of linkage in c language?

1102


What is the correct code to have following output in c using nested for loop?

1123


What is define directive?

1217


Write a program to implement queue.

1174


How do you define a function?

1079


What does the && operator do in a program code?

1282


What is function prototype?

1217


Write a code on reverse string and its complexity.

1095


How can I change the size of the dynamically allocated array?

1209


What does calloc stand for?

1245


What is a char c?

1089


What is a program flowchart and explain how does it help in writing a program?

1362


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1091


Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)

1209


What is dynamic variable in c?

1099