#include <bits/stdc++.h>using namespace std; void f(int& a){ a=5; return;}int main() { int a=8; f(a); cout<<a;}
Standard input is empty
5
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!