Intermediate C++
Q62 / 100

What is the std::string_view (C++17)?

Correct! Well done.

Incorrect.

The correct answer is B) A non-owning read-only reference to a character sequence, avoiding copies when only read access is needed

B

Correct Answer

A non-owning read-only reference to a character sequence, avoiding copies when only read access is needed

Explanation

string_view is a lightweight (pointer + length) view into an existing string. It avoids allocation when passing substrings or literals to functions.

Progress
62/100