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 |
Can class objects be passed as function arguments?
What are the differences between a struct and a class in C++?
What do the header files usually contains?
what is pulse code modulation?
What is the use of namespace std in C++?
Why is c++ a mid-level programming language?
Explain the isa and hasa class relationships.
What is data binding in c++?
What are the different types of comments allowed in c++?
What can I use instead of namespace std?
What is the outcome of cout< a) 16 b) 17 c) 16.5
how many trys can we write in one class