#include #include using namespace std; int main() { bool a = 0x03; bitset<8> x(a); cout<
bool a = 0x03; converts 0x03 to a boolean value. Since every numeric value that is not zero will be evaluated to be true, you'll see the first result, regardless of which data you'll assign.
bool a = 0x03;