Examveda

What will be the output of the following C# code?
public static void Main() 
{
    byte varA = 10;
    byte varB = 20;
    long result = varA | varB; 
    Console.WriteLine("{0}  OR  {1} Result :{2}", varA, varB, result);
    varA = 10;
    varB = 10;
    result = varA | varB;  
    Console.WriteLine("{0}  OR  {1} Result : {2}", varA, varB, result);
}

A. 20, 10

B. 30, 10

C. 10, 20

D. 10, 10

Answer: Option B


Join The Discussion

Related Questions on Operators and Expressions in C Sharp