Allocate arrays with new[]: int* arr = new int[100]; creates space for 100 integers. The size can be a variable, unlike stack arrays which need compile-time sizes in standard C++. Free array memory with delete[]: delete[] arr; The brackets tell the system this is an array so it frees all elements.
Using plain delete on an array is undefined behavior. Mixing new with delete[] or new[] with delete corrupts memory. Always match the forms: new pairs with delete, new[] pairs with delete[].
Smart pointers handle this automatically.