Which of the following header files must necessarily be included to use dynamic memory allocation functions?
A
stdio.h
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
dos.h
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
memory.h
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
stdlib.h
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
Open in App
Solution
The correct option is D stdlib.h stdlib.h is a header file which stands for the standard library. It consists of the declaration for dynamic memory allocation functions such as malloc(), calloc(), realloc() and free.