6. Write a function in C or Java that right rotates the contents of a given integer array. For example,
if A = {45, 23, 11, 87, 4, 6, 26, 10}, then we have A = {10, 45, 23, 11, 87, 4, 6, 26} after it has
been right rotated. (10%)