How do you allocate and deallocate memory in C++?
Use the malloc() function to allocate memory in designated blocks and the new function to create a new function. To reallocate memory, the realloc() function is used. When finished, always include a free() function in order to free up the memory. If you used new(), use delete() to free up the memory.
| Is This Answer Correct ? | 0 Yes | 0 No |
Copy Linked List using recursive function?
What is polymorphism & list its types in c++?
What is the best book for c++ beginners?
Explain the purpose of the keyword volatile.
What is the difference between = and == in C?
20 Answers Christ University, Intel,
What is a v-table?
What is c++ map?
What is the best c++ book?
What is meant by entry controlled loop?
0 Answers Agilent, ZS Associates,
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
What is a modifier in c++?
what is upcasting in C++?