// Delete pointer int* ptr1 = new int; delete ptr1; // Delete array int* array = new int[10]; delete[] array;
#include<iostream> using namespace std; int main() { int* ptr 1 = 4; delete ptr1; }