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
All fields
“Strings & string_view” in Information Technology
17 questions across 1 technology.
Information Technology
17 questions in 1 technology
#
Question
Technology
Topic
Level
1
What is std::
string_view
and why was it added?
C++ › Strings & string_view
C++
Strings
&
string_view
Beginner
2
What are the dangers of std::
string_view
?
C++ › Strings & string_view
C++
Strings
&
string_view
Intermediate
3
Why should you avoid returning std::
string_view
to local data?
C++ › Strings & string_view
C++
Strings
&
string_view
Intermediate
4
What is the difference between passing const std::string& and std::
string_view
?
C++ › Strings & string_view
C++
Strings
&
string_view
Advanced
5
How do you handle Unicode and encodings in C++
strings
?
C++ › Strings & string_view
C++
Strings
&
string_view
Advanced
6
What is std::string and how does it differ from a C-string?
C++ › Strings & string_view
C++
Strings
&
string_view
Beginner
7
How do you convert between std::string and numbers?
C++ › Strings & string_view
C++
Strings
&
string_view
Beginner
8
What common operations does std::string provide?
C++ › Strings & string_view
C++
Strings
&
string_view
Beginner
9
How does std::string manage memory and what is SSO?
C++ › Strings & string_view
C++
Strings
&
string_view
Intermediate
10
How do you efficiently build up a large string?
C++ › Strings & string_view
C++
Strings
&
string_view
Intermediate
11
What is std::format (C++20) and how does it improve string formatting?
C++ › Strings & string_view
C++
Strings
&
string_view
Advanced
12
What is std::
strings
tream and when is it useful?
C++ › I/O Streams
C++
I/O Streams
Intermediate
13
What is the difference between >> and std::getline for input?
C++ › I/O Streams
C++
I/O Streams
Intermediate
14
How can you convert an enum to a string (reflection limitations)?
C++ › Enums & Enum Classes
C++
Enums & Enum Classes
Advanced
15
What are the # (stringize) and ## (token paste) operators?
C++ › Preprocessor & Macros
C++
Preprocessor & Macros
Advanced
16
What are stream manipulators and how are they used?
C++ › I/O Streams
C++
I/O Streams
Advanced
17
How do you improve iostream performance for large I/O?
C++ › I/O Streams
C++
I/O Streams
Advanced