What's the difference between calloc() and malloc()?

Answer Posted / bhaswati

malloc allocates m bytes means it takes one arguments.but calloc allocate m times n bytes and initialized the memory location to zero.it takes two arguments.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can you tell whether two strings are the same?

593


What are the different types of data structures in c?

614


What is the difference between null pointer and wild pointer?

648


What is the explanation for modular programming?

696


Write a program to print "hello world" without using a semicolon?

606






What is difference between stdio h and conio h?

900


Is printf a keyword?

772


What is variables in c?

615


What is atoi and atof in c?

626


What is a keyword?

757


how to create duplicate link list using C???

2085


Explain what is wrong in this statement?

645


Why doesnt this code work?

626


Are global variables static in c?

686


What does c mean?

600