#include <iostream>using namespace std; void foo(int x){ x = x*x;} int main(){ int x = 2; foo(x); cout << x;}
Standard input is empty
2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!