I'm assuming n
is the size of the array. If so, you can use the following code:
int tmp = arr[n - 1]; /* Store the last element in `tmp` */
for(int i = n - 1; i > 0; i--) /* Loop backwards */
arr[i] = arr[i - 1]; /* Move all elements up */
arr[0] = tmp; /* Insert the last element at the first location */