Sheeshy Sipgrark
New member
What will be the output for following input from the console as a character?
A. Compile time error
B. Code run successfully prints nothing on console
C. Code runs successfully prints input on console
D. Run time error
Code:
static void Main(string[] args)
{
Console.WriteLine("what is your name?");
char s;
s = Convert.ToChar(Console.ReadLine());
Console.WriteLine("how are you: "+s);
Console.Read();
}
B. Code run successfully prints nothing on console
C. Code runs successfully prints input on console
D. Run time error