If I have two character arrays as follows:

longest[]
reversed[]

How do I reverse the order of longest[] and put it in reversed[]?  This
is what I am trying right now and it doesn't work.

        for(i=0; longest[i] != '\n'; ++i)
                b=++r;
        printf("\n%d Is what r is",r);
        printf("%d is what b is",b);

        for (; r>0; --r)
                reversed[r] = longest[(b-r)];

I am using the first for statement to find out how long the string is
and cant figure out why the second for statement doesn't move and
reverse longest[] to reversed[] a single character at a time.  

Thanks for any help.

[EMAIL PROTECTED]

Reply via email to