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 to declare a variable?

963


Explain how can I convert a number to a string?

1102


What do you mean by Recursion Function?

1073


Explain can static variables be declared in a header file?

1107


Explain what are global variables and explain how do you declare them?

1088


What is getche() function?

989


What is build process in c?

1083


What is a built-in function in C?

1520


Explain how can I pad a string to a known length?

1127


Write a code of a general series where the next element is the sum of last k terms.

992


How can I write a function analogous to scanf?

1103


how to make a scientific calculater ?

2012


What is modeling?

1003


Calculate 1*2*3*____*n using recursive function??

1986


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1884