InterviewSolution
Saved Bookmarks
| 1. |
How Is Memory Allocated/deallocated In C ? How About C++ ? |
|
Answer» 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. 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. |
|