Write a function void reverse(int p[],int n) so that the contents of p[0],p[1],...,p[n-1] after reverse(p,n) are the contents of p[n-1],...,p[1],p[0] before reverse(p,n).