diff --git a/cpp-memory-management b/cpp-memory-management new file mode 100644 index 0000000..e8a0bb3 --- /dev/null +++ b/cpp-memory-management @@ -0,0 +1,21 @@ +#include +using namespace std +int main() +{ +int size; // variable declaration +int *arr = new int[size]; // creating an array +cout<<"Enter the size of the array : "; +std::cin >> size; // +cout<<"\nEnter the element : "; +for(int i=0;i>arr[i]; +} +cout<<"\nThe elements that you have entered are :"; +for(int i=0;i