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 / naresh guguloth(iiit,basar)b09

malloc():-
-------
It is used to allocate memory for one variable only.
int*hi=(int*)malloc(sizeof(int));
calloc():-
It is used to allocate memory for any array.
int*bye=(int*)calloc(sizeof(int),10)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define macros.

1331


What is a constant?

1113


Do variables need to be initialized?

1113


Describe static function with its usage?

1276


What is declaration and definition in c?

1178


Wt are the Buses in C Language

3262


what are bit fields in c?

1825


What are the various types of control structures in programming?

1106


What is cohesion and coupling in c?

1097


List some of the dynamic data structures in C?

1305


How do I convert a string to all upper or lower case?

1173


What are the loops in c?

1053


how to execute a program using if else condition and the output should enter number and the number is odd only...

2374


What is main () in c language?

1187


What is the difference between malloc() and calloc()?

1986