Pass by Reference void pass_by_ref(int &i) { i = 4; } int main() { int j = 1; pass_by_ref(j); std::cout << j << std::endl; // outputs 4, not 1 }