What will be the output of the following C# code?
static void Main(string[] args)
{
int a = 5;
int b = 10;
int c;
Console.WriteLine(c = ++ a + b ++);
Console.WriteLine(b);
Console.ReadLine();
}
static void Main(string[] args)
{
int a = 5;
int b = 10;
int c;
Console.WriteLine(c = ++ a + b ++);
Console.WriteLine(b);
Console.ReadLine();
}
A. 11, 10
B. 16, 10
C. 16, 11
D. 15, 11
Answer: Option C
Join The Discussion