WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?
Answer Posted / naresh guguloth(iiit,basar)b09
malloc():-
-------
It is used to allocate memory for one variable only.
int*hi=(int*)malloc(sizeof(int));
calloc():-
It is used to allocate memory for any array.
int*bye=(int*)calloc(sizeof(int),10)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Define macros.
What is a constant?
Do variables need to be initialized?
Describe static function with its usage?
What is declaration and definition in c?
Wt are the Buses in C Language
what are bit fields in c?
What are the various types of control structures in programming?
What is cohesion and coupling in c?
List some of the dynamic data structures in C?
How do I convert a string to all upper or lower case?
What are the loops in c?
how to execute a program using if else condition and the output should enter number and the number is odd only...
What is main () in c language?
What is the difference between malloc() and calloc()?