C Programming - Memory Allocation - Discussion
Discussion Forum : Memory Allocation - General Questions (Q.No. 1)
1.
Which header file should be included to use functions like malloc() and calloc()?
Discussion:
37 comments Page 2 of 4.
Yogeshkumar said:
1 decade ago
stdlib.h is the header file which contain predefine prototype for malloc() & calloc().
Akash patel said:
1 decade ago
How we will decide which one is better calloc or malloc during memory allocation?
Bittubohemia said:
1 decade ago
How memory can be allocate in android? Can anyone explain?
Ashu said:
1 decade ago
How calloc() is better than malloc? Explain with a example?
Vinutha said:
1 decade ago
What is free ();?
Anjireddy said:
1 decade ago
calloc(), malloc(), realloc(), free() are the functions for used for dynamic allocation of memory. So, They are predefined functions we can use them by including stdlib.h.
Kumar mani said:
1 decade ago
calloc() is better than malloc().
Ganesh said:
1 decade ago
What is mean by malloc, calloc and realloc explain with simple example?
Anusha said:
1 decade ago
Yes, @Abhay is correct. Malloc, calloc, realloc and free functions are for dynamic memory allocation, which are stored in heap section. And in stdlib.h header file.
Abhayraj said:
1 decade ago
malloc, calloc, realloc, free are functions used 4 dynamic memory allocation. 4 such functions we should include header file of standard library (stdlib.h).
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers