what is the difference between malloc() and calloc() function?



what is the difference between malloc() and calloc() function?..

Answer / amritha rose

malloc will allocate memory according to the size we
specified
calloc vil allocate memory as blockwise
and initialize by 0

Is This Answer Correct ?    9 Yes 1 No

Post New Answer

More C Interview Questions

C,c++, Java is all are structural oriented or procedure oriented language..?

6 Answers  


What 'lex' does?

0 Answers   Tech Mahindra,


Create a simple code fragment that will swap the values of two variables num1 and num2.

0 Answers  


IS it possible to define a zero sized array in c.if it is possible how can the elements of that array can be accessed.array index starts from zero,if it is possible to define zero sized array how can be its first element can be accesseed.

5 Answers   TCS,


for (i <= 5 && i >= -1;++i; i > 0) { printf("%d ", i); }

1 Answers  






If null and 0 are equivalent as null pointer constants, which should I use?

0 Answers  


What is your favorite subject?

1 Answers   Ericsson, Invendis, Tech Mahindra,


Why header file is used in c?

0 Answers  


What is the difference between malloc() and calloc() function in c language?

0 Answers  


how is the examination pattern?

0 Answers   Wipro,


How will you write a code for accessing the length of an array without assigning it to another variable?

0 Answers  


What is nested structure in c?

0 Answers  


Categories