print a array given by user in c++ code example Example: prints out the elements in the array c++ for (auto i : a){ //C++11 cout << i<< " "; }