int arr[10]; // Size of this array is 10
int n; cin >> n; int* arr = new int[n]; // Size of this array is determined by user input
#includeIn this example, we declare an array named `arr` of size 5 using std::array from the Standard Template Library. We specify the number of elements for the array as a template argument, and the array size is determined at compile-time. Package library: Standard Template Library (STL).std::array arr; // Size of this array is 5