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

Explain the difference between call by value and call by reference in c language?

1053


Can we access array using pointer in c language?

1041


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

977


What is stack in c?

1028


Define Spanning-Tree Protocol (STP)

1071


How can I direct output to the printer?

1272


Explain how do you declare an array that will hold more than 64kb of data?

1398


write a c program to find the sum of five entered numbers using an array named number

2076


What is the maximum length of an identifier?

1135


What is a char in c?

931


Why is it that not all header files are declared in every C program?

1145


What are the data types present in c?

1091


Why do we use & in c?

950


What is a c token and types of c tokens?

1011


How will you declare an array of three function pointers where each function receives two ints and returns a float?

1292