0
4.8kviews
Write a program in C to cyclically rotate the elements in array.
written 8.3 years ago by | modified 2.8 years ago by |
Program should accept a choice in which direction to rotate i.e. left or right. Depending on choice it should perform cyclic rotation. Suppose array A contains elements {1, 2, 3, 4, 5} then if choice is rotate right o/p should be {5, 1, 2, 3, 4) and if choice is rotate left then o/p should be (2, 3, 4, 5, 1)
ADD COMMENT
EDIT
1 Answer