c++ print an arra code example Example: print array c++ void printArray(int a[],int n){ for(int i=0;i<n;i++) cout<<a[i]<<" "; cout<<endl; }