Answers for "dinamic allocation with new & delete cpp"

C++
0

dinamic allocation with new & delete cpp

// Release memory pointed by pointer-variable
delete pointer-variable;
Posted by: Guest on July-09-2021
-1

dinamic allocation with new & delete cpp

// Pointer initialized with NULL
// Then request memory for the variable
int *p = NULL; 
p = new int;   

            OR

// Combine declaration of pointer 
// and their assignment
int *p = new int;
Posted by: Guest on April-23-2021

Browse Popular Code Answers by Language