
3. String manipulation
Authored by Lin Nad
Computers
Professional Development
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary implication of strings being 'immutable' in C#?
Answer explanation
Immutability means a string value remains unchanged after creation.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In C#, how do you include a double quote character inside a verbatim string literal?
Answer explanation
Verbatim strings escape embedded quotes by doubling them.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which escape sequence is used to trigger a carriage return in a standard string?
Answer explanation
\r is the standard escape sequence for a carriage return.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the expression " hello ".Trim()?
Answer explanation
Trim() removes leading and trailing whitespace from a string.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Given text = "Rain, rainbow, brain", what will text.Contains("RAIN", StringComparison.OrdinalIgnoreCase) return?
Answer explanation
OrdinalIgnoreCase performs a case-insensitive search, so "RAIN" matches "Rain".
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to perform a logical exclusive OR (XOR) on boolean operands?
Answer explanation
The ^ operator represents boolean exclusive OR in C#.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
According to the principles of lexical scope, what happens if you attempt to use a variable outside the curly braces in which it was declared?
Answer explanation
A variable can only be used within the scope where it is declared.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?