Hi! I have just started programming, and I have a question for my assignment:

When the input is ABCDE, i want the output to be EDCBA. But for some reason I cant understand he output i get is: EDCDE

My code is:
for (int i = 0; i < b; i=i++)
char temp1 = a[i];
a[i] = a[(b-1)-i];
a[(b-1)-i] = temp1;
cout << a[i] ;

b is the word...

Please help me Thank you!