Answers for "new and delete operator in c++"

C++
-1

new and delete operator in c++

// 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