How Is Memory Allocated/deallocated In C ? How About C++ ?

1 Answer(s)

Memory is allocated in C using malloc() and freed using free(). In C++ the new() operator is used to allocate memory to an object and the delete() operator is used to free the memory taken up by an object.

Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.