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

What is the use of putchar function?

0 Answers  


i want to know the procedure of qualcomm for getting a job through offcampus

0 Answers   HCL,


What is static function in c?

0 Answers  


What is the difference between typedef struct and struct?

0 Answers  


how to make a scientific calculater ?

0 Answers  






write a program whose output will be- 1 12 123 1234

10 Answers  


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

0 Answers  


Define the scope of static variables.

0 Answers  


In a switch statement, what will happen if a break statement is omitted?

0 Answers  


Is stack a keyword in c?

0 Answers  


How do you initialize pointer variables?

0 Answers  


The difference between printf and fprintf is ?

0 Answers   Baan Infotech,


Categories