Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Operators Questions
Predict the output of the following C#.NET code (pay close attention to post-increment and pre-increment on the same variable): int i, j = 1, k; for (i = 0; i < 5; i++) { k = j++ + ++j; Console.Write(k + " "); }
C#.NET — Which of the following is NOT an arithmetic operator?
C#.NET — Predict the output of the following ternary operator code: int a = 10, b = 20, c = 30; int res = a < b ? (a < c ? c : a) : b; Console.WriteLine(res);
C#.NET — Identify the correct statements among the following operators: The conditional operator (?:) returns one of two values depending on a Boolean expression. The as operator is used to perform conversions between compatible reference types. The * operator is also used to declare pointer types and dereference pointers. The -> operator combines pointer dereferencing and member access. Brackets [ ] specify array indexing, while parentheses () are used for grouping and type casts.
C#.NET — Predict the output of: Console.WriteLine(13 / 2 + " " + 13 % 2);
C#.NET — Which of the following is correct about the Bitwise OR operator (|)?
C#.NET — Which of the following is correct about the Bitwise XOR operator (^) ?
C#.NET — Which of the following are NOT relational operators? = != Not <= <>=
C#.NET — Evaluate and predict the output: int num = 1, z = 5; if (!(num <= 0)) Console.WriteLine(++num + z++ + " " + ++z); else Console.WriteLine(--num + z-- + " " + --z);
C#.NET — Which of the following is NOT a bitwise operator?
C#.NET — Which of the following is NOT an assignment operator?
Bit operations in C# (Byte): turn OFF the 4th bit from the right (bit value 8) without changing other bits. Which statement performs this correctly?
C# increment forms: which statements correctly increase variable a by exactly 1?
C# bit test (Byte): check whether the 4th bit from the right (value 8) is ON. Which condition is correct?
C# bitwise operations output — evaluate AND and XOR on bytes byte b1 = 0xF7; byte b2 = 0xAB; byte temp; temp = (byte)(b1 & b2); Console.Write(temp + ' '); temp = (byte)(b1 ^ b2); Console.WriteLine(temp);
Logical operators in C#: select all that are logical (short-circuit or logical-not) operators from the list: 1) && 2) || 3) ! 4) Xor 5) %
Evaluate the Boolean expression in C#: what is assigned to c? int a = 10; int b = 20; bool c; c = !(a > b);
Understanding the bitwise AND (&) operator in C#: which uses are correct? 1) Invert a bit 2) Put a bit ON (set to 1) 3) Put a bit OFF (clear to 0) 4) Check whether a bit is ON 5) Check whether a bit is OFF
C# bitwise NOT, shifts, and promotions — predict the output 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);
Boolean to integer via Convert in C#: what value is assigned? d = Convert.ToInt32(!(30 < 20));