A
Adil1972
Guest
i dont know why it is not working, i want line 4 and 5 output to be "cc bb aa" instead of
charArray = System.Char[]
charArray = System.Char[]
1) string longSentence = "aa bb cc";
2) char[] charArray = longSentence.ToCharArray();
3) Array.Reverse(charArray);
4) Console.WriteLine($"charArray = {charArray}");
5) Console.WriteLine("charArray = " + charArray);
6) Console.WriteLine(charArray);
Output
1) charArray = System.Char[]
2) charArray = System.Char[]
3) cc bb aa
Continue reading...
charArray = System.Char[]
charArray = System.Char[]
1) string longSentence = "aa bb cc";
2) char[] charArray = longSentence.ToCharArray();
3) Array.Reverse(charArray);
4) Console.WriteLine($"charArray = {charArray}");
5) Console.WriteLine("charArray = " + charArray);
6) Console.WriteLine(charArray);
Output
1) charArray = System.Char[]
2) charArray = System.Char[]
3) cc bb aa
Continue reading...