have to write a program to rotate the elements of an array a specified number of places input by the user, with these specifications:
1. A positive number indicates a rotation to the right
2. A negative number indicates a rotation to the left
3. Use only pointer notation (not array notation) in the functions other than main.
4. Do not declare additional space to hold an array outside of main; in other words, rotate the array "in place"
Does anyone know how to go about adding into this partial code to make this work?
#define SIZE 10
/* function prototypes go here */
int main()
{
int a = {23, -3, 6, 19, 88, -5, 7, 34, -101, 88};
int places;
printf("Original array:\n");
showArray(a, SIZE);
printf("\n\nRotate how many places (+/- for right/left)? ");
scanf("%d", &places);
rotate(a, SIZE, places);
printf("\nRotated array:\n");
showArray(a, SIZE);
printf("\n\n");
system("pause");
return 0;
}