Memory Allocation - Study Mode
[#1] In C, which header file should be included to use dynamic memory allocation functions?
Correct Answer
(A) stdlib.h
[#2] What is the purpose of the 'malloc' function in C?
Correct Answer
(A) To allocate dynamic memory
[#3] Which function is used to allocate an array of elements in C?
Correct Answer
(A) calloc()
[#4] What does the 'calloc' function in C do?
Correct Answer
(A) Allocates and initializes memory to zero
[#5] Which function is used to change the size of an allocated block of memory in C?
Correct Answer
(B) realloc()