fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. void f(unsigned int& i)
  6. {
  7. i = 0x12345678;
  8. }
  9.  
  10. int main() {
  11.  
  12. unsigned long long int j = 0x0011223344556677;
  13. f((unsigned int&)j);
  14. cout << hex << j;
  15. }
Success #stdin #stdout 0.01s 5504KB
stdin
Standard input is empty
stdout
11223312345678