fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. float d = 1.0f;
  7. int i = d;
  8. int* pi = (int*)&d;
  9.  
  10. cout << sizeof(float) << " " << sizeof(int) << endl;
  11. cout << i << endl;
  12. cout << *pi << endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 4392KB
stdin
Standard input is empty
stdout
4 4
1
1065353216