×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

What will be the output of the following C# code? | Question 8

39. What will be the output of the following C# code?

using System;

class Program {
  static void Main(string[] args) {
    Console.WriteLine(true ^ true);
  }
}
  1. True
  2. False
  3. Error
  4. None

Answer: B) False

Explanation:

Here, we are using the Logical exclusive OR operator ^ (XOR). It returns true when one operand evaluates to true and another operand evaluates to false. In the above code, both of the operands are true. Thus, the output will be False.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.