Disable ads (and more) with a membership for a one time $2.99 payment
Which functions does C provide for dynamic memory allocation?
new and delete
malloc() and free()
alloc() and dealloc()
create() and destory()
The correct answer is: malloc() and free()
C provides the functions malloc() and free() for dynamic memory allocation, not new and delete (which are related to C++). Option C suggests functions called alloc() and dealloc(), but those do not exist in C. Option D includes functions create() and destroy(), which are also not valid function names in C. Thus, the correct answer is B.