String Reverse - Algorithm
Algorithm to Reverse String in C :
- Start
- Take 2 Subscript Variables ‘i’,'j’
- ‘j’ is Positioned on Last Character
- ‘i’ is positioned on first character
- str[i] is interchanged with str[j]
- Increment ‘i’
- Decrement ‘j’
- If ‘i’ > ‘j’ then goto step 3
- Stop