WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?
Answer Posted / abhishek pathak mnnit
1- malloc() takes one argument while calloc takes 2 argument.
2- default value of malloc is garvage while calloc is 0;
3- malloc allocate memory in contiguous form while calloc
allocate memory in contiguous form if not avilable the takes
diffrent place.
| Is This Answer Correct ? | 88 Yes | 18 No |
Post New Answer View All Answers
What is 2c dna?
5 Write an Algorithm to find the maximum and minimum items in a set of ānā element.
What is extern variable in c with example?
Why is structure padding done in c?
What is memory leak in c?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What are structure members?
Do you know the use of 'auto' keyword?
What is the meaning of c in c language?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
What is a macro in c preprocessor?
What is the difference between array and linked list in c?
what are non standard function in c
Explain what are global variables and explain how do you declare them?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above