#include <iostream>
using namespace std;
int main()
{
int arra[4] = {10,45,20,30};
/*cout << "Type number";
cin >> arra[1];*/
cout<<arra;
}
There is an implicit conversion from lvalues and rvalues of array type to rvalues of pointer type: it constructs a pointer to the first element of an array. This conversion is used whenever arrays appear in context where arrays are not expected, but pointers are:
...
std::ostream
массивы выводить не умеет, а вот указатели - вполне себе. for (int i = 0; i < 4; i++)
cout << arra[i];