int* p = new int(42);
// ...
delete p;
struct Node {
int data;
Node* next;
};
Node* head = nullptr; // Empty list
Q1. Which is the correct way to allocate an array of 10 integers in C++?
Q2. What happens if you forget to `delete` dynamically allocated memory?