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
How can I determine whether a machines byte order is big-endian or little-endian?
How pointer is different from array?
What is the purpose of the preprocessor directive error?
Why does the call char scanf work?
Define circular linked list.
What is getche() function?
Are pointers integer?
How can I run c program?
How many data structures are there in c?
Why is it important to memset a variable, immediately after allocating memory to it ?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
how many errors in c explain deply
Combinations of fibanocci prime series
How many keywords (reserve words) are in c?
Explain how can you avoid including a header more than once?