WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?

Answer Posted / arshad

1.
calloc function takes two argument while malloc takes only 1
2.
by default memory allocated by malloc contains garbage values
whereas that allocated by calloc contains all zero.

Is This Answer Correct ?    49 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Suggesting that there can be 62 seconds in a minute?

588


Can you write a programmer for FACTORIAL using recursion?

602


Why do we use null pointer?

597


provide an example of the Group by clause, when would you use this clause

1692


What is static memory allocation?

597






Why does notstrcat(string, "!");Work?

630


explain what is a newline escape sequence?

678


When should the register modifier be used? Does it really help?

596


what is ur strangth & weekness

1804


What is pointer and structure in c?

556


Is using exit() the same as using return?

666


What are the types of macro formats?

594


Is void a keyword in c?

563


What is the return type of sizeof?

579


What is the meaning of && in c?

539