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
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
What is mean by data types in c?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
What are two dimensional arrays alternatively called as?
What is p in text message?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
what is different between auto and local static? why should we use local static?
Can a variable be both constant and volatile?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
What are the different data types in C?
What is break in c?
a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler
Explain about the constants which help in debugging?
Why calloc is better than malloc?