Memory Allocation - Objective type Interview question with answers on C Programming
Questions
1
With every use of memory allocation function, what function should be used to release allocated memory which is no longer needed?
Answer: Option [D]
The library function free() is used to deallocate the memory that is no longer be used. This deallocated memory is dynamically allocated by malloc, calloc and realloc previously.
2
Physically placing the machine instructions and data into main memory is done by
Answer: Option [B]
⭐ Make GKSeries Your Preferred Source on Google
Add GKSeries as Preferred Source
3
Which header file should be included to use function like malloc() and calloc()?
Answer: Option [B]
The stdlib.h header file contains malloc(), calloc() and realloc() dynamically allocated array functions.
5
Which data structure is used by malloc() for object creation?
Answer: Option [A]