W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
7 questions for “String Handling & StringBuilder”
Found in 1 field. Select a question to see its full answer.
Information Technology
7 questions in 1 technology
#
Question
Technology
Topic
Level
1
How do you convert between an enum value and its underlying numeric value, and between an enum and its
string
name?
C# › Enums & Flags
C#
Enums & Flags
Beginner
2
How do you slice an array or
string
efficiently without allocating a new array/
string
, using Span<T> or ReadOnlySpan<T>?
C# › Arrays, Span<T> & Memory<T>
C#
Arrays, Span<T> & Memory<T>
Intermediate
3
How does the [Flags] attribute change the output of To
String
() on a combined flags enum value?
C# › Enums & Flags
C#
Enums & Flags
Intermediate
4
How does
string
interpolation work, and how does it compare to
string
.Format() and simple concatenation?
C# › Fundamentals
C#
Fundamentals
Intermediate
5
How would you write a high-performance CSV field parser using ReadOnlySpan<char> that avoids all intermediate
string
allocations?
C# › Arrays, Span<T> & Memory<T>
C#
Arrays, Span<T> & Memory<T>
Advanced
6
How do C# 11's raw
string
literals (`"""..."""`) simplify writing
string
s containing quotes, escape sequences, or multi-line content like JSON or SQL?
C# › Modern C# Features (Global Usings, File-Scoped Namespaces, Top-Level Statements)
C#
Modern C# Features (Global Usings, File-Scoped Namespaces, Top-Level Statements)
Advanced
7
How do StreamReader and StreamWriter differ from directly using a FileStream, and when would you choose them?
C# › File I/O & Streams
C#
File I/O & Streams
Intermediate