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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if a header file is included twice?

600


What are types of functions?

567


Is it possible to pass an entire structure to functions?

563


What is a volatile keyword in c?

638


where are auto variables stored? What are the characteristics of an auto variable?

595






What's the right way to use errno?

626


What is the purpose of void pointer?

599


What is the scope of global variable in c?

558


What is the use of void pointer and null pointer in c language?

632


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

657


what will be maximum number of comparisons when number of elements are given?

1410


How we can insert comments in a c program?

634


What is the sizeof () operator?

624


Differentiate between #include<...> and #include '...'

617


Explain what is wrong with this statement? Myname = ?robin?;

1027