Search Header Logo

Quiz on Interpolated Strings and String Manipulation in C#

Authored by Jose Cruz

Computers

12th Grade

Used 1+ times

Quiz on Interpolated Strings and String Manipulation in C#
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What character must an interpolated string begin with?

&

@

#

$

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method is used to convert a character to lowercase?

char.LowerCase(ch)

char.ConvertToLower(ch)

char.ToUpper(ch)

char.ToLower(ch)

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the placeholder {sales} represent in an interpolated string?

A constant

A string literal

A variable

A method

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which format specifier is used to format a value as currency?

C

N

F

E

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the method str.Trim() do?

Converts a string to uppercase

Removes leading and trailing spaces

Removes all spaces from a string

Replaces spaces with hyphens

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which method is used to insert a string into another string?

Merge

Add

Insert

Append

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the default capacity of a StringBuilder object?

32 characters

16 characters

64 characters

128 characters

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?