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 |
what is upcasting in C++?
Do class declarations end with a semicolon?
Define vptr.
What is the difference between cin.read() and cin.getline()?
Differentiate between C and C++.
Have you used MSVC? What do you think of it?
What is difference between c++ and c ++ 14?
What are the different types of comments allowed in c++?
Can malloc be used in c++?
What is fixed in c++?
There is a magic square matrix in such a way that sum of a column or a row are same like 3 5 2 4 3 3 3 2 5 sum of each column and row is 10. you have to check that matrix is magic matrix or not?
What is null c++?