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
Tell me what are bitwise shift operators?
Explain 'bit masking'?
What are the two types of functions in c?
Write a program to print numbers from 1 to 100 without using loop in c?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What functions are used in dynamic memory allocation in c?
What is gets() function?
Write a C program in Fibonacci series.
What is the use of a conditional inclusion statement in C?
What does main () mean in c?
What is the difference between typedef struct and struct?
What is a good data structure to use for storing lines of text?
What are the 32 keywords in c?
Can we assign integer value to char in c?
What is the use of f in c?