#include <iostream> using namespace std; int func(int x, int &y, int &z) { x = z; y = z; return z + 1; } int main() { int a = 1; int b = 2; int c = 3; int d = func(a, b, c); }