Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following C# code?
{
char A = ‘K’;
char B = Convert.ToChar(76);
A++;
B++;
Console.WriteLine(A+ ” ” +B);
Console.ReadLine();
}

What will be the output of the following C# code?
{
char A = ‘K’;
char B = Convert.ToChar(76);
A++;
B++;
Console.WriteLine(A+ ” ” +B);
Console.ReadLine();
}
a) M L
b) U L
c) L M
d) A B

Answer: c
Explanation: “++” increments the value of character by 1. A and B are given values K and 76, when we use increment operator their values increments by 1, A and B becomes L and M.

Join The Discussion