?
What will be the output of the following C# code?
What will be the output of the following C# code?
static void Main(string[] args)
{
int a = 5, b = 10;
if (Convert.ToBoolean(Convert.ToInt32(++a)) || Convert.ToBoolean(Convert.ToInt32(++b)))
{
Console.WriteLine(a + "\n" + b);
}
else
Console.WriteLine(" C# ");
}
static void Main(string[] args)
{
int a = 5, b = 10;
if (Convert.ToBoolean(Convert.ToInt32(++a)) || Convert.ToBoolean(Convert.ToInt32(++b)))
{
Console.WriteLine(a + "\n" + b);
}
else
Console.WriteLine(" C# ");
}
Join the Discussion
Login to post a comment or share your explanation.
Login