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 what is a const pointer?
write a progrmm in c language take user interface generate table using for loop?
Explain what’s a signal? Explain what do I use signals for?
What is the difference between arrays and pointers?
What does #pragma once mean?
What is the use of #define preprocessor in c?
How can I convert a number to a string?
What does main () mean in c?
What are the two types of functions in c?
What does *p++ do? What does it point to?
What is bubble sort in c?
What is a pointer and how it is initialized?
What is volatile variable in c with example?
Explain what is a static function?
Explain what header files do I need in order to define the standard library functions I use?