Just for Practice 1 Additional [3-Jan-2018 to 10-Apr-2018]
Program ID- 1243
Given a set of elements stored in an array and a number ‘m’, design an Algorithm and write the subsequent C program to perform cyclic right shift of the array by ‘m’ places. For example, if the elements are 12, 13, 16, 7, 10 and m =2 then the resultant set will be 7, 10, 12, 13, 16.
Input Format:
Number of elements in the set: ‘n’
element-1
element-2
…
element-n
value of ‘m’
Output Format:
Elements in the set after right shift by ‘m’ places.
Code
Please comment down if the code worked for you, also comment if you have other working codes
Input Format:
Number of elements in the set: ‘n’
element-1
element-2
…
element-n
value of ‘m’
Output Format:
Elements in the set after right shift by ‘m’ places.
Code
Please comment down if the code worked for you, also comment if you have other working codes
NOTE:The Above Codes are for reference only. It doesn't mean everyone to directly copy/paste those codes.
thank you for sharing nice article
ReplyDeletevisit
web programming tutorial
welookups