"this is a pen" this is input string ..how to get out put string"pen a is this " using c#
reverse string
hi this is krishna
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VasanthPosted Apr 12, 2010, 12:20 PM
Krishna , we have lot of logic here to find the solution ..
One of the answer is below , please check .
string strInputSentense = "this is a pen";
string[] arrInputWords = strInputSentense.Split(' ');
Array.Reverse(arrInputWords);
strInputSentense = string.Join(" ", arrInputWords);
Response.Write(strInputSentense);
Please mark as answer , if it helps you.