Answer Posted / bijaya
1)malloc() function does not initialize the memory which it
allocates thats why it takes the garbage value.but calloc()
function initializes the allocated memory to zero thats why
it cant take any garbage value.
2)malloc() function takes single arg.that is the variabe
which is used to indicate the memory size to be
allocated.calloc() function takes two args-i) variable which
indicates the number of memory blocks.ii)variable which
indicates the size of each blocks.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is %d called in c?
How do we make a global variable accessible across files? Explain the extern keyword?
How can I find the modification date and time of a file?
What is a stream water?
What is the correct declaration of main?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
What is string function in c?
Explain how can I right-justify a string?
When should you not use a type cast?
What is the sizeof () operator?
Why is it important to memset a variable, immediately after allocating memory to it ?
What is malloc() function?
What is a const pointer in c?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
What is the value of uninitialized variable in c?