C# Programming - Operators - Discussion
Discussion Forum : Operators - General Questions (Q.No. 2)
2.
What will be the output of the C#.NET code snippet given below?
byte b1 = 0xF7;
byte b2 = 0xAB;
byte temp;
temp = (byte)(b1 & b2);
Console.Write (temp + " ");
temp = (byte)(b1^b2);
Console.WriteLine(temp);
Discussion:
33 comments Page 4 of 4.
Kavitha said:
1 decade ago
I couldn't understand that how it works. Please explain the steps.
Abhijit Marne said:
1 decade ago
11110111 & 10101011 = 10100011 ie 163
11110111 | 10101011 = 01011100 ie 92
11110111 | 10101011 = 01011100 ie 92
Rohit said:
1 decade ago
Please explain all steps and it's working rule.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers