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 the format specifier for printing a pointer value?
write a progrmm in c language take user interface generate table using for loop?
What is auto keyword in c?
Why is c not oop?
What is an identifier?
Is it possible to initialize a variable at the time it was declared?
What is extern keyword in c?
What is static and auto variables in c?
How do we open a binary file in Read/Write mode in C?
I heard that you have to include stdio.h before calling printf. Why?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
What are pointers really good for, anyway?
What is pivot in c?
How do you determine the length of a string value that was stored in a variable?
What do you mean by invalid pointer arithmetic?