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's the difference between calloc() and malloc()?

Answer Posted / valli

the diffence is
1.prototype or no of arguments
calloc takes two arguments
where as malloc takes 1 argument
void *calloc(int ,int);
first argument is no of blocks required
secund argument is no of elementts in each block required
void *malloc(int);
in this total no of bytes reuired are taken as the argument
2.
calloc clears the bytes which are allocated or reserved
where malloc can not guarentee this


sorry for my poor english

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the meaning of c in c language?

1172


What is the difference between struct and union in C?

1316


write a c program in such a way that if we enter the today date the output should be next day's date.

2196


What are qualifiers?

1051


How can I read a binary data file properly?

1178


Why can’t constant values be used to define an array’s initial size?

1383


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

1953


What is %lu in c?

1261


What is the right way to use errno?

1058


What does 1f stand for?

1162


What is #include conio h?

1002


Do you know what are the properties of union in c?

1082


Write a function that will take in a phone number and output all possible alphabetical combinations

1052


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

1301


How to create struct variables?

1111