Help me to Reverse a string without Replacing the position of the Special charactor in it
input : Pro#gramm&ing
output: gni#mmarg&orP
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.
Ramachandran MPosted Dec 3, 2019, 1:20 AM
string strOriginal = string.Empty;
char[] reversed = str.ToCharArray().Reverse().ToArray();
foreach (char chr in reversed)
{
strOriginal = strOriginal + chr.ToString();
}
Console.WriteLine(str);
char[] reversed = str.ToCharArray().Reverse().ToArray();
Console.WriteLine(str);
Console.WriteLine(reversed);
Posted Dec 2, 2019, 10:58 PM
Mageshwaran RPosted Nov 23, 2019, 12:10 PM
Cynthia SathuragiriPosted Aug 16, 2018, 2:29 AM
Jenith ThakkarPosted Aug 13, 2018, 2:22 AM
var reversedWords = string.Join(" ",