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

What is time null in c?

587


Why is extern used in c?

614


What are the disadvantages of c language?

624


What is a structure in c language. how to initialise a structure in c?

611


Can true be a variable name in c?

561






What is a spanning Tree?

962


Explain what is the difference between a free-standing and a hosted environment?

637


int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

758


Write a program to reverse a given number in c?

603


How to delete a node from linked list w/o using collectons?

2091


Explain the ternary tree?

605


What’s a signal? Explain what do I use signals for?

614


What is the importance of c in your views?

599


What are the different data types in C?

731


all c language question

1878