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 is used for string concatenation?
A
+
B
&
C
|
D
None
Note:
The + operator is used to concatenate strings in C#.
Show answer
Show Note
Report
Question:
What will the expression 5 > 2 && 3 > 1 evaluate to?
A
true
B
false
C
null
D
error
Note:
Both conditions are true, so the logical AND returns true.
Show answer
Show Note
Report
Question:
What is the output of !(2 == 2)?
A
true
B
false
C
null
D
Error
Note:
The expression evaluates to true, and negating it gives false.
Show answer
Show Note
Report
Question:
Which operator is used to perform a bitwise negation?
A
!
B
~
C
^
D
None
Note:
The ~ operator inverts all bits of the operand.
Show answer
Show Note
Report
Question:
What does the => operator signify in C#?
A
Return statement
B
Lambda expression
C
Ternary operation
D
None
Note:
The => operator is used in defining lambda expressions.
Show answer
Show Note
Report
Question:
What will the expression false || true evaluate to?
A
true
B
false
C
null
D
error
Note:
The logical OR evaluates to true if at least one operand is true.
Show answer
Show Note
Report
Question:
Which of the following is NOT a bitwise operator?
A
&
B
+
C
|
D
^
Note:
The + operator performs arithmetic addition, not bitwise operation.
Show answer
Show Note
Report
Question:
What is the output of 5 != 5?
A
true
B
false
C
null
D
error
Note:
The != operator checks if two values are not equal; here they are equal.
Show answer
Show Note
Report
Question:
What does a++ do?
A
Increments a by 1 and returns the old value
B
Increments a by 1 and returns the new value
C
Decreases a by 1
D
None
Note:
The ++ operator can be used as a postfix operator to return the original value before increment.
Show answer
Show Note
Report
Question:
What will 3 | 2 evaluate to?
A
1
B
2
C
3
D
5
Note:
The bitwise OR results in 5 (binary 11 | 10 = 11).
Show answer
Show Note
Report
First
Prev
9
10
11
12
13
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