#include <iostream>
int main() {
unsigned int n = 1150336788;
unsigned char* p = reinterpret_cast<unsigned char*>(&n);
std::cout << "Integer hex value: 0x" << std::hex << n << std::endl;
std::cout << "Byte by byte: " << static_cast<unsigned int>(*p) << " "
<< static_cast<unsigned int>(*(p + 1)) << " "
<< static_cast<unsigned int>(*(p + 2)) << " "
<< static_cast<unsigned int>(*(p + 3)) << std::endl;
}
/*
run:
Integer hex value: 0x4490bf14
Byte by byte: 14 bf 90 44
*/