Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void rotateByOne(int arr[])
- {
- int i, first;
- /* Store first element of array */
- first = arr[0];
- for(i=0; i<SIZE-1; i++)
- {
- /* Move each array element to its left */
- arr[i] = arr[i + 1];
- }
- /* Copies the first element of array to last */
- arr[SIZE-1] = first;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement