# Q1:Which of the following statements is correct about the C#.NET code snippet given below? ``````int d; d = Convert.ToInt32( !(30 < 20) );``````

A A value 0 will be assigned to d.
B A value 1 will be assigned to d.
C A value -1 will be assigned to d.
D The code reports an error.
E The code snippet will work correctly if ! is replaced by Not.

A 1, 3
B 2, 4
C 3, 5
D 4, 5
E None of these

# Q3: Suppose n is a variable of the type Byte and we wish, to check whether its fourth bit (from right) is ON or OFF. Which of the following statements will do this correctly?

A
``````if ((n&16) == 16)
Console.WriteLine("Fourth bit is ON");``````
B
``````if ((n&8) == 8)
Console.WriteLine("Fourth bit is ON");``````
C if ((n ! 8) == 8) Console.WriteLine("Fourth bit is ON");
D if ((n ^ 8) == 8) Console.WriteLine("Fourth bit is ON");
E if ((n ~ 8) == 8) Console. WriteLine("Fourth bit is ON");

A &
B |
C <<
D ^
E ~

A 1, 2, 4
B 2, 3, 5
C 3, 4, 5
D 1, 3, 5
E None of these

A 1, 3
B 2, 4
C 4, 5
D 1, 4
E None of these

A \=
B /=
C *=
D +=
E %=

# Q8: Which of the following statements is correct about Bitwise | operator used in C#.NET?

A The | operator can be used to put OFF a bit.
B The | operator can be used to Invert a bit.
C The | operator can be used to check whether a bit is ON.
D The | operator can be used to check whether a bit is OFF.
E The | operator can be used to put ON a bit.

A 8 4 16 12 20
B 4 8 12 16 20
C 4 8 16 32 64
D 2 4 6 8 10

A 163 92
B 92 163
C 192 63
D 0 1

# Q11: Which of the following statements is correct about Bitwise ^ operator used in C#.NET?

A The ^ operator can be used to put ON a bit.
B The ^ operator can be used to put OFF a bit.
C The ^ operator can be used to Invert a bit.
D The ^ operator can be used to check whether a bit is ON.
E The ^ operator can be used to check whether a bit is OFF.

A n = n && HF7
B n = n & 16
C n = n & 0xF7
D n = n & HexF7
E n = n & 8

A 1, 2, 3
B 1, 3, 4
C 2, 4, 5
D 3, 4, 5
E None of these

A 6.5 1
B 6.5 0
C 6 0
D 6 1
E 6.5 6.5

A 1, 2, 4
B 2, 3, 5
C 3, 4
D 3, 4, 5
E None of these

A 102 1 38
B 108 0 32
C 102 0 38
D 1 0 1

A 1, 3
B 2, 4
C 3, 5
D 4, 5
E None of these

A **
B +
C /
D %
E *

A 5 6
B 6 5
C 6 6
D 7 7

# Q20:What will be the output of the C#.NET code snippet given below? ``````int a = 10, b = 20, c = 30; int res = a < b ? a < c ? c : a : b; Console.WriteLine(res);``````

A 10
B 20
C 30
D Compile Error / Syntax Error

## For help Students Orientation Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.