sign up
I
login
advanced
refer a friend - earn nickels!!
Home
Ask & Discuss Questions
Study Material
Experts Zone
Hang Out!
View Q'n'A Discussions
Ask Experts
Ask Community
Course Chapters
Test Papers
Question Archive
Community Shelf
Text-Book Reviews
Expert Team
Partner Institutions
Vriti Educational Archipelago
Offers-Online Tests
Pics Zone
Video Zone
Laughter Zone
Ask & Discuss Questions with Community & Experts
Moderation Team
Discussion Response Post to:
arrays
Forum Index
->
Computer Science
->
View Full Question
Author
Message
27 Mar 2008 20:19:06 IST
Subject:
arrays
joyfrancis
(
1504
)
Blazing goIITian
236
[
398
rates]
total posts:
1801
Offline
reversal ofarrays
for(int i=0;i<n/2;i++)
{
temp=arr[i];
arr[i]=arr[n-1-i];
arr[n-1-i]=temp;
}
This will turn 1,2,3,4,5,6 into 6,5,4,3,2,1
There is no better feeling in this world than being a winner!
this reply: 5
points (with
1
in
1
votes )
[?]
You have to be logged on to rate
Top Offers for goIITians
Correspondence Courses
Brilliant Tutorials
Narayana Institute
Aakash Institute
Classroom/Crash Courses
Narayana -
Kota , Delhi , Others
Brilliant Tutorials -
Class
,
Crash
Aakash Institute -
Medical
,
Engg
Online Test Series
Brilliant Tutorials
Narayana Institute
Aakash Institute
Mahesh Tutorials
AMITY
Sri Chaitanya