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 / ananth kumar

malloc
Holds 1 argument data type
allocates memory byte equivalent to data type
not init alloted memory

Calloc
Holds 2 arguments, data type and number of datas (n)
allocates memory block equivalent to n * data type
clears alloted memory with 0

Is This Answer Correct ?    173 Yes 39 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c is a high level language?

1254


#include { printf("Hello"); } how compile time affects when we add additional header file .

1942


what are the advantages of a macro over a function?

1192


ATM machine and railway reservation class/object diagram

5310


What are c header files?

1037


Explain the term printf() and scanf() used in c language?

1096


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1811


How do you determine a file’s attributes?

1134


What is strcmp in c?

1217


write a program to print largest number of each row of a 2D array

2372


Which is best book for data structures in c?

1140


c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

1101


what is stack , heap ,code segment,and data segment

2770


What does typeof return in c?

1161


How do I create a directory? How do I remove a directory (and its contents)?

1223