WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?
Answer Posted / md ajij
1.malloc() allocate one block of space in memory , argument
of the malloc is the size of the block.
where as calloc() allocate multiple blocks in the memory
,argument of the malloc() is the size of a block and number
of blocks.
2. malloc() takes garbage value at the initial time where
initial value of calloc() is zero.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain how can I write functions that take a variable number of arguments?
How important is structure in life?
What is the use of putchar function?
What is sizeof array in c?
Why double pointer is used in c?
What is the size of structure in c?
What is a dynamic array in c?
Explain the difference between null pointer and void pointer.
Do variables need to be initialized?
What is the value of h?
Explain what is the best way to comment out a section of code that contains comments?
What are the features of c language?
Why main function is special give two reasons?
Explain how do you determine a file’s attributes?
Do pointers need to be initialized?