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 do you define a function?
What is array of pointers to string?
What does %c mean in c?
Are enumerations really portable?
Which node is more powerful and can handle local information processing or graphics processing?
What is the use of extern in c?
How do you construct an increment statement or decrement statement in C?
How can I remove the leading spaces from a string?
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell
Is c still used?
What is the difference between abs() and fabs() functions?
Why do we use null pointer?
What are derived data types in c?
What are logical errors and how does it differ from syntax errors?
What are the advantages of c language?