Array Rotation
Rotation of elements of an array
The code acquires n (n <= maxN with #define maxN 30), the values of the array v from keyboard and performs repeated rotations of the input array, where at each iteration the user decides the value of p(p < n, p=0 to terminate the program) as well as the direction of the rotation (dir =-1 for right, dir = 1 for left) and the resulting rotated array is printed on the screen.