It seems to me that the C ++ 17 standard is coming out, and already in full use of C ++ 14 and C ++ 11, frankly, it is not convenient to devote more time and energy to the usual forms more than 18 years ago. So I would say that one of the preferred ways in C ++ is to use std :: vector as the default container, unless it is decided by another (like std :: list, std :: deque, std :: array or others ).
Using a std :: vector, the simplest and most usual way I think it is
#include <iostream>
#include <vector>
void mostrarArray(const std::vector<int>& a)
{
for(const auto& i : a)
std::cout << i << ' ';
std::cout << '\n';
}
int main()
{
std::vector<int> a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
mostrarArray(a);
}