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

Mention four important string handling functions in c languages .

1106


What is the difference between typedef and #define?

1060


how to create duplicate link list using C???

2558


What does & mean in scanf?

1105


What are the 4 data types?

1016


What does int main () mean?

1022


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2073


What is pointer to pointer in c language?

1143


What does dm mean sexually?

1307


What is function what are the types of function?

996


What is a #include preprocessor?

1150


Explain what are preprocessor directives?

1067


Differentiate between functions getch() and getche().

1047


What is the best way to store flag values in a program?

1073


What is pragma c?

1122