For example the following code example demonstrates how to print array without loop:
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
int main()
{
short arr[] = { 10, 20, 30, 40 };
copy(arr,arr + sizeof(arr) / sizeof(arr[0]),ostream_iterator<short>(cout,"\n"));
}