Answers for "how to delete pointer"

C
1

how to delete pointer

// deleting pointer allocating an int
int *pointer1 = new int;
delete pointer1;

// deleting pointer allocating an array of ints
int *pointer2 = new int[10];
delete[] pointer2;
Posted by: Guest on May-18-2021
0

pointer new and delte

p= new (nothrow) int[i];
Posted by: Guest on February-24-2021

Code answers related to "C"

Browse Popular Code Answers by Language