What's the difference between calloc() and malloc()?
Answer Posted / valli
the diffence is
1.prototype or no of arguments
calloc takes two arguments
where as malloc takes 1 argument
void *calloc(int ,int);
first argument is no of blocks required
secund argument is no of elementts in each block required
void *malloc(int);
in this total no of bytes reuired are taken as the argument
2.
calloc clears the bytes which are allocated or reserved
where malloc can not guarentee this
sorry for my poor english
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
Is it possible to execute code even after the program exits the main() function?
What is a node in c?
Why c is called procedure oriented language?
praagnovation
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
What is const and volatile in c?
What is the general form of a C program?
Why is not a pointer null after calling free?
How is = symbol different from == symbol in c programming?
how to count no of words,characters,lines in a paragraph.
Explain the difference between getch() and getche() in c?
What is the significance of scope resolution operator?
what are the facialities provided by you after the selection of the student.
Explain pointer. What are function pointers in C?