What will be the output of the following C# code?
bool a = true;
bool b = false;
a |= b;
Console.WriteLine(a);
Console.ReadLine();
bool a = true;
bool b = false;
a |= b;
Console.WriteLine(a);
Console.ReadLine();
A. 0
B. 1
C. True
D. False
Answer: Option C
Related Questions on Operators and Expressions in C Sharp
What does the modulus operator (%) do in C#?
A. Increments the operand by 1
B. Returns the quotient of a division
C. Performs multiplication
D. Returns the remainder of a division
Join The Discussion