QUOTE(kkgaming @ 16 Mar, 2007 - 01:34 PM)

that will reverse both sets though won't it? I just want the second part fliped.
Maybe I'm treating this to much in depth. Here's what he wants me to do.
Print list (array) backward. I guess doing to sections to make it look nice is just getting in the way.
will you please expain it in more details
here what I understood upto now
if array is : 1 2 3 4 5 6
then output should be : 1 2 3 6 5 4
is that right?
if you want to flip just the second part then you need to traverse just the half part of array something like.
for(i=0;i<=length/2;i++)
print
then
for(i=length;i>length/2;i--)
again print
same is for recursion
CODE
if(index>=length) return;
if(index<=length/2)
printf("%d",array[index]);
recursive(array,index+1,length);
if(index>length/2)
printf("%d",array[index]);
If you are trying to say something different then please explain it completely [more examples would help.]
This post has been edited by AmitTheInfinity: 16 Mar, 2007 - 12:50 AM