ExamVeda
Login
Home
Operators and Expressions in C Sharp
?

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);
}

Answer & Solution
Correct Answer: Option B
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.