Write and test the following function: void rotate(int a[], int n, int k);
The function "rotates" the first n elements of the array a, k positions to the right (or -k positions to the left if k is negative). The last k elements are "wrapped" around to the beginning of the array. For example, the call rotate(a,8,3) would transform the array {22,33,44,55,66,77,88,99} into {77,88,99,22,33,44,55,66}. The call rotate(a,8,-5) would have the same effect.