fork(1) download
  1. #include <iostream>
  2. #include <cstring>
  3.  
  4. int main()
  5. {
  6. char x[6] = {0};
  7. int y = 0x48656c6c6f;
  8.  
  9. std::memcpy(x, &y, sizeof y);
  10.  
  11. for (char c : x)
  12. std::cout << c;
  13. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
olle