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

There are two differences.
1) is the number of arguments. Malloc() takes a single
argument (memory required in bytes), while calloc() needs
two arguments (number of variables to allocate memory, size
in bytes of a single variable).
2)malloc() does not initialize the memory allocated, while
calloc() initializes the allocated memory to ZERO.

Is This Answer Correct ?    15 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the need of structure in c?

1060


What are the difference between a free-standing and a hosted environment?

1236


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

1067


What is difference between && and & in c?

1058


How do you redirect a standard stream?

1062


Write a program to print factorial of given number without using recursion?

962


What is a good way to implement complex numbers in c?

1007


What is FIFO?

1561


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1981


Explain how do you generate random numbers in c?

1053


What is the difference between exit() and _exit() function?

1006


What are the functions to open and close the file in c language?

997


Write a program to generate random numbers in c?

1059


What is typedef example?

1126


I came across some code that puts a (void) cast before each call to printf. Why?

1165