What is the difference between "calloc" and "malloc"?

Answer Posted / samveethsingh

malloc:
malloc create the single block of given size by user
calloc:
calloc creates multiple blocks of given size

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between pointer to constant vs. Pointer constant

793


I was a c++ code and was asked to find out the bug in that. The bug was that he declared an object locally in a function and tried to return the pointer to that object. Since the object is local to the function, it no more exists after returning from the function. The pointer, therefore, is invalid outside.

806


How many types of modularization are there in c++?

756


What is the difference between structures and unions?

772


What are the stages in the development cycle?

761






What is functions syntax in c++?

797


Difference between a copy constructor and an assignment operator.

742


Is c++ primer good for beginners?

764


How do you decide which integer type to use?

742


How can an improvement in the quality of software be done by try/catch/throw?

791


What is the use of 'this' pointer?

996


Will the following program execute?

778


Write my own zero-argument manipulator that should work same as hex?

776


What is the use of turbo c++?

745


Explain some examples of operator overloading?

847