c++ const_cast

Why the statement below print two values and one address:
#include <iostream>
using namespace std;

int main() {
const int i = 2147483646;
int *j = const_cast<int*>(&i); // Preferred
*j = 2147483647;
cout << i <<endl<<*j <<endl<<endl;
cout <<&i <<endl<<j <<endl;
}
Thank's whom will answer
All the best
You're breaking the rules of C++ so anything is allowed happen.
thank you
Topic archived. No new replies allowed.