To xpi0t0s:

I tried to do what you said. I printed out i and (b-1-i), what I got was

i = 0, b-1-i = 4
i = 1, b-1-i = 3
i = 2, b-1-i = 2
i = 3, b-1-i = 1
i = 4, b-1-i = 0

And that is what I want, because this I suppose would reverse all the letters. So I don't understand what I am doing wrong.

My teacher says that i++ is the same as i = i+1, therefore I didn't change.

But I have tried and tried now, and I don't see what is wrong, so maybe you could give me another hint?

just to correct myself om my last reply: for (int i = 0; i < b; i++)