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

What is a pointer and how it is initialized?

1161


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4285


4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

2188


What is the maximum no. of arguments that can be given in a command line in C.?

1154


How to implement a packet in C

2890


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

2344


What is the best way to comment out a section of code that contains comments?

1346


Is a house a shell structure?

1165


Who developed c language and when?

1071


What is a pointer in c plus plus?

1311


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2882


What is the correct code to have following output in c using nested for loop?

1087


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1724


How can I read/write structures from/to data files?

976


Do string constants represent numerical values?

1399