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

1)malloc() function does not initialize the memory which it
allocates thats why it takes the garbage value.but calloc()
function initializes the allocated memory to zero thats why
it cant take any garbage value.

2)malloc() function takes single arg.that is the variabe
which is used to indicate the memory size to be
allocated.calloc() function takes two args-i) variable which
indicates the number of memory blocks.ii)variable which
indicates the size of each blocks.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the format specifier for printing a pointer value?

1023


write a progrmm in c language take user interface generate table using for loop?

2051


What is auto keyword in c?

1208


Why is c not oop?

980


What is an identifier?

1036


Is it possible to initialize a variable at the time it was declared?

1220


What is extern keyword in c?

1135


What is static and auto variables in c?

1091


How do we open a binary file in Read/Write mode in C?

1242


I heard that you have to include stdio.h before calling printf. Why?

1070


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1134


What are pointers really good for, anyway?

1066


What is pivot in c?

1030


How do you determine the length of a string value that was stored in a variable?

1125


What do you mean by invalid pointer arithmetic?

1079