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

Tell me what are bitwise shift operators?

1172


Explain 'bit masking'?

1134


What are the two types of functions in c?

1057


Write a program to print numbers from 1 to 100 without using loop in c?

1134


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1202


What functions are used in dynamic memory allocation in c?

1119


What is gets() function?

1185


Write a C program in Fibonacci series.

1132


What is the use of a conditional inclusion statement in C?

1106


What does main () mean in c?

1143


What is the difference between typedef struct and struct?

1163


What is a good data structure to use for storing lines of text?

1139


What are the 32 keywords in c?

1140


Can we assign integer value to char in c?

1336


What is the use of f in c?

1029