Home »
MCQs »
C# MCQs
What will be the output of the following C# code? | Question 9
40. What will be the output of the following C# code?
using System;
class Program {
static void Main(string[] args) {
Console.WriteLine(true && false);
}
}
- True
- False
- Error
- None
Answer: B) False
Explanation:
Here, we are using the Conditional logical AND operator (&&). It returns true of both of the operands evaluate to true. In the above code, the operands are true, false. Thus, the output will be "False".