Vidyalelo
C# Programming · Q44

File Handling and Input Output in C Sharp

Programming · C# Programming · question 44

Q44

What will be the output for following input from the console as a character? 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();

A.
Compile time error
B.
Code run successfully prints nothing on console
C.
Code runs successfully prints input on console
D.
Run time error
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board