fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float x = 318206.125;
  6. int y = *reinterpret_cast<int *>(&x);
  7.  
  8. cout << x << endl;
  9. cout << y << endl;
  10.  
  11. return 0;
  12. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
318206
1218142148