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:
Which operator would you use to perform a logical negation?
A
&
B
|
C
!
D
~
Note:
The ! operator negates a boolean value.
Show answer
Show Note
Report
Question:
What does a %= b do?
A
Assigns the remainder of a divided by b to a
B
Subtracts b from a
C
Adds b to a
D
None
Note:
This is a compound assignment operator.
Show answer
Show Note
Report
Question:
What is the output of true && true || false?
A
true
B
false
C
null
D
error
Note:
The logical AND is evaluated first, resulting in true, which then evaluates to true with the OR.
Show answer
Show Note
Report
Question:
Which operator performs a bitwise AND operation?
A
&&
B
&
C
|
D
||
Note:
The & operator performs a bitwise AND operation on two integral types.
Show answer
Show Note
Report
Question:
Which operator is used to perform a ternary conditional operation?
A
&&
B
? :
C
if
D
switch
Note:
The ternary operator allows for shorthand conditional expressions.
Show answer
Show Note
Report
Question:
What does x != y check?
A
If x is less than y
B
If x is greater than y
C
If x is equal to y
D
If x is not equal to y
Note:
!= operator checks for inequality.
Show answer
Show Note
Report
Question:
What is the result of 10 % 3?
A
1
B
2
C
0
D
3
Note:
The modulo operator returns the remainder of the division.
Show answer
Show Note
Report
Question:
Which of the following is a compound assignment operator?
A
=+
B
+=
C
==
D
!=
Note:
Compound assignment operators perform an operation and assignment in one step.
Show answer
Show Note
Report
Question:
What does the << operator do?
A
Performs bitwise left shift
B
Performs bitwise right shift
C
None
D
Both
Note:
The << operator shifts bits to the left, effectively multiplying the number.
Show answer
Show Note
Report
Question:
What is the output of 0 | 1?
A
1
B
0
C
2
D
3
Note:
The bitwise OR operation results in 1 (binary 00 | 01 = 01).
Show answer
Show Note
Report
First
Prev
11
12
13
14
15
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