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

Answer Posted / nashiinformaticssolutions

 malloc(): Allocates a single block of memory without initializing it.
 calloc(): Allocates multiple blocks of memory and initializes them to zero.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain which function in c can be used to append a string to another string?

850


What is class and object in c?

829


Explain what is the most efficient way to store flag values?

953


Explain pointers in c programming?

886


What is the meaning of typedef struct in c?

830


What is a pointer value and address in c?

839


How can type-insensitive macros be created?

935


What is ponter?

1043


Explain what is #line used for?

818


What is the difference between int main and void main?

809


What is scanf () in c?

847


What is the c value paradox and how is it explained?

819


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1772


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1832


what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

1640