simple example program #include <iostream.h> int f(int x) { x = x + 7 ; return x ; } int main() { int x, y ; x = 3 ; y = f(x) ; cout << y << endl ; cout << x << endl ; return 0 ; }