#include <iostream>
template <typename T>
void print_elements(T* array, int x, int y){
std::cout << '[';
for(;x<y;x++)
std::cout << array[x] << ' ';
std::cout << ']\n';
}
int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
print_elements(&arr[0], 2, 4);