Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C# Programming
»
Operators
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);
163 92
92 163
192 63
0 1
Correct Answer:
163 92
← Previous Question
Next Question→
More Questions from
Operators
Which of the following are Logical operators in C#.NET? && || ! Xor %
Which of the following statements are correct about the following code snippet? int a = 10; int b = 20; bool c; c = !(a > b); There is no error in the code snippet. An error will be reported since ! can work only with an int. A value 1 will be assigned to c. A value True will be assigned to c. A value False will be assigned to c.
Which of the following statements are correct about the Bitwise & operator used in C#.NET? The & operator can be used to Invert a bit. The & operator can be used to put ON a bit. The & operator can be used to put OFF a bit. The & operator can be used to check whether a bit is ON. The & operator can be used to check whether a bit is OFF.
What will be the output of the C#.NET code snippet given below? byte b1 = 0xAB; byte b2 = 0x99; byte temp; temp = (byte)~b2; Console.Write(temp + " "); temp = (byte)(b1 << b2); Console.Write (temp + " "); temp = (byte) (b2 >> 2); Console.WriteLine(temp);
Which of the following statements is correct about the C#.NET code snippet given below? int d; d = Convert.ToInt32( !(30 < 20) );
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments