C++ Quiz65 of 173
Difficulty:
⬅️ Prev: 148Quiz ID: 151Next: 152 ➡️

According to the C++23 standard, what is the output of this program?

#include <iostream>
#include <type_traits>

int main()
{
    std::cout << std::is_signed<char>::value;
}
Hint

Plain char, signed char, and unsigned char are three distinct types.

Reveal answer

The program is unspecified / implementation defined

Explanation

§[basic.fundamental]¶7:

Type char is a distinct type that has an implementation-defined choice of “signed char” or “unsigned char” as its underlying type.

⬅️ Prev: 148Quiz ID: 151Next: 152 ➡️