Pure C Array Reverse using Pointer

#include <iostream>
#include <string>
 
using namespace std;
 
void array_reverse(int* ch, int len)
{
    int n = len / 2;
    for ( int i=0 ; i<n; i++ ) {
        int tmp = ch[len-i-1];
        ch[len-i-1] = ch[i];
        ch[i] = tmp;
    }
}
 
int main()
{
    int items[] = {0, 1, 2, 3, 4, 5, 6};
    array_reverse(items, 7);
    for (int i: items) {
        cout << i << endl;
    }
}