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 / nazia wasim

malloc and calloc both are used to allocate
memory dynamically but the difference is
malloc allocates single block of memory and
calloc allocates multiple block of memory as
per the requirement.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should we use pointers in a c program?

1194


What is const and volatile in c?

1094


When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd

1127


write a program to find out prime number using sieve case?

2137


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1131


What does int main () mean?

1078


What is a method in c?

1211


Is anything faster than c?

1062


how is the examination pattern?

2062


What is volatile variable in c?

1155


What are extern variables in c?

1036


What is the difference between c &c++?

1208


What is variable in c example?

1131


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

1097


How can I do serial ("comm") port I/O?

1215