Answer Posted / namita
1-memory allocated by malloc contains garbage value.But
memory allocated by calloc is initialised to zero.
2-malloc takes only one argument which indicates the size
to be allocated.But calloc takes two arguments.First
argument indicates the number of blocks to be allocated
where as the second argument indicates the size of the
block.
| Is This Answer Correct ? | 35 Yes | 2 No |
Post New Answer View All Answers
How to declare a variable?
Explain how can I convert a number to a string?
What do you mean by Recursion Function?
Explain can static variables be declared in a header file?
Explain what are global variables and explain how do you declare them?
What is getche() function?
What is build process in c?
What is a built-in function in C?
Explain how can I pad a string to a known length?
Write a code of a general series where the next element is the sum of last k terms.
How can I write a function analogous to scanf?
how to make a scientific calculater ?
What is modeling?
Calculate 1*2*3*____*n using recursive function??
What would happen to X in this expression: X += 15; (assuming the value of X is 5)