Sunday, September 4, 2011

Reverse of a string by words C# example

string-reversal-example


Creating a program to generate the reverse of a string variable in C#, VB .Net, or C++ programming is pretty a easy job. Please note that we are talking about a word by word string reversal, for example the string given below 


Hello How Are You

Becomes the following string when read backwards

You Are How Hello


Reversal of characters inside a word is a different story, which is not covered here.
Some people find word order reversal difficult, that's why I'm putting the C# example code here.