What is the maximum number of bytes that can be allocated using 'malloc' in C?
A. It depends on the system and available memory
B. 2^16 bytes
C. 2^32 bytes
D. 2^64 bytes
Answer: Option A
A. It depends on the system and available memory
B. 2^16 bytes
C. 2^32 bytes
D. 2^64 bytes
Answer: Option A
In C, which header file should be included to use dynamic memory allocation functions?
A. stdlib.h
B. malloc.h
C. memory.h
D. alloc.h
What is the purpose of the 'malloc' function in C?
A. To allocate dynamic memory
B. To allocate static memory
C. To deallocate memory
D. To find memory leaks
Which function is used to allocate an array of elements in C?
A. calloc()
B. malloc()
C. alloc()
D. array()
What does the 'calloc' function in C do?
A. Allocates and initializes memory to zero
B. Allocates memory and leaves it uninitialized
C. Deallocates memory
D. Checks for memory leaks
Join The Discussion