C#.NET
Test
Model Test
Ebook
Test on C#.Net framwork 4 Sep 30
CSharp Model Test 1
CSharp Model Test Three
Index
C#.NET Home
Datatype
59
Basic
28
Methods
5
Arrays
3
Object-Oriented Programming
11
Operators
53
Control Structure
18
Schools
Ebook
Question:
What does the operator >> do in C#?
A
Performs bitwise left shift
B
Performs bitwise right shift
C
Both
D
None
Note:
The >> operator shifts bits to the right, effectively dividing the number by 2 for each shift.
Show answer
Show Note
Report
Question:
Which operator is used to perform a conditional check?
A
? :
B
&&
C
||
D
==
Note:
The ternary operator ? : performs a conditional check and returns one of two values based on the condition.
Show answer
Show Note
Report
Question:
What does a /= b do?
A
Divides a by b and assigns the result to a
B
Multiplies a by b and assigns the result to a
C
None
D
Both
Note:
This is a compound assignment operator.
Show answer
Show Note
Report
Question:
What is the output of 1 + 2 * 3?
A
9
B
7
C
6
D
5
Note:
The multiplication operator has higher precedence than addition.
Show answer
Show Note
Report
Question:
Which operator checks for null?
A
is
B
as
C
??
D
All
Note:
is can check for null, and ?? provides a default value if null.
Show answer
Show Note
Report
Question:
What is the result of 4 << 1?
A
2
B
4
C
8
D
16
Note:
The left shift operator shifts the bits to the left, multiplying by 2 for
Show answer
Show Note
Report
Question:
What does a += b do?
A
Subtracts b from a
B
Multiplies a by b
C
Adds b to a
D
None
Note:
This is a compound assignment operator that combines addition and assignment.
Show answer
Show Note
Report
Question:
What is the output of !(true && false)?
A
true
B
false
C
null
D
Error
Note:
The expression inside evaluates to false, and negating it results in true.
Show answer
Show Note
Report
Question:
Which operator is used to check for equality?
A
==
B
=
C
=!=
D
===
Note:
The == operator checks if two values are equal.
Show answer
Show Note
Report
Question:
What does the as operator do?
A
Casts an object to a specified type and returns null if the cast fails
B
Checks the type of an object
C
Assigns a value to a variable
D
None
Note:
The as operator is used for safe type casting.
Show answer
Show Note
Report
First
Prev
10
11
12
13
14
Next
Last
/18
Go
Schools
App Store
Whiteboard
Blogs
Quiz
Test
Apply Course
Games
Freelancers
Professionals
Newspapers
Terms
Privacy
Copyright © 2025. Powered by
Intellect Software Ltd