Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
rotate an array by 2 places
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
ph sudharani
New Member
Join Date:
Jul 2012
Posts:
1
#1
rotate an array by 2 places
Jul 25 '12, 04:53 PM
input: array[] = {0,1,2,3,4};
output should be {3,4,0,1,2};
can you please help me
Rabbit
Recognized Expert
MVP
Join Date:
Jan 2007
Posts:
12517
#2
Jul 25 '12, 05:07 PM
Use a temporary variable to store the value as you swap them out.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment