fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a = 1234;
  6. int* b = &a;
  7. float* c = reinterpret_cast<float*>(&a);
  8.  
  9. std::cout << a << '\n';
  10. std::cout << b << '\n';
  11. std::cout << *b << '\n';
  12. std::cout << c << '\n';
  13. std::cout << *c << '\n';
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1234
0xbfa5dcec
1234
0xbfa5dcec
1.7292e-42