Following program reverses the i/p.
When you remove following code
Console.Write("Reverse number: ");
Console.Write(arrayChar);
and inserted following one
Console.Write("Reverse number: " + arrayChar);
o/p for whatever i/p is
Reverse number: System.Char[]
Please explain the reason for different o/p. Problem is highlighted.
using System;
class Program
{
static void Main()
{
Console.Write("Enter any number: ");
string s = Console.ReadLine();
char[] arrayChar = s.ToCharArray();
Array.Reverse(arrayChar);
Console.Write("Reverse number: ");
Console.Write(arrayChar);
Console.ReadLine();
}
}