write a program to traverse an array in c++ code example Example: how to iterate through array in c++ for(int i=0; i<n; i++) cout<<array[i]<<" " cout<<endl;