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

1-memory allocated by malloc contains garbage value.But
memory allocated by calloc is initialised to zero.

2-malloc takes only one argument which indicates the size
to be allocated.But calloc takes two arguments.First
argument indicates the number of blocks to be allocated
where as the second argument indicates the size of the
block.

Is This Answer Correct ?    35 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the diffrenet bettwen HTTP and internet protocol

1800


What is line in c preprocessor?

1010


What is difference between class and structure?

1077


What is the difference between memcpy and memmove?

983


What is file in c preprocessor?

1097


If you know then define #pragma?

1060


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

23628


Multiply an Integer Number by 2 Without Using Multiplication Operator

729


How can you increase the allowable number of simultaneously open files?

1099


How to Throw some light on the splay trees?

1019


What is operator precedence?

1160


If the size of int data type is two bytes, what is the range of signed int data type?

994


When should volatile modifier be used?

968


Why do we use int main instead of void main in c?

1110


What is the use of linkage in c language?

1019