You are taking quiz cppquiz.org/q/9hgop. After 0 of 10 questions, you have 0.00 points.
Question #337 Difficulty:
According to the C++23 standard, what is the output of this program?
#include <iostream>
#include <type_traits>
int main() {
auto a = "Hello, World!";
std::cout << std::is_same_v<decltype("Hello, World!"), decltype(a)>;
return 0;
}
Hint:
A string literal is an lvalue, and its type is "array of n const char
".
The type of a
is deduced using the rules for template argument deduction.
Mode : Quiz
If you want to quit the current quiz and go back to training mode, click here.