#include <iostream> int main(){ int x = 5; const int y = x; int* ptr = (int*)&y; *ptr = 10; std::cout << y;}
Standard input is empty
10
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!