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 do you mean by dynamic memory allocation in c? What functions are used?
What are pointers?
Why ca not I do something like this?
Mention four important string handling functions in c languages .
FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.
What is c method?
What is actual argument?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
When should volatile modifier be used?
Why is C language being considered a middle level language?
What does a pointer variable always consist of?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
Is null valid for pointers to functions?
illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question
What are the two types of structure?