1. // calls.cpp
 2. 
 3. #include <iostream>
 4. 
 5. int  a (int);
 6. int  b (int);
 7. void c (int);
 8. 
 9. int main ()
10. {
11.    int i = 5;
12.    cout << "begin program:    i = " << i << endl;
13.    i = a(i);
14.    cout << "end   program:    i = " << i << endl;
15. 
16.    return 0;
17. }  // function main
18. 
19. int a ( int i )
20. {
21.    cout << "begin function a: i = " << i << endl;
22.    i++;
23.    i = b(i);
24.    cout << "end   function a: i = " << i << endl;
25.    return i++;	
26. }  // function a
27. 
28. int b ( int j )
29. {
30.    cout << "begin function b: j = " << j << endl;
31.    j = j + 5;
32.    c(j);
33.    cout << "end   function b: j = " << j << endl; 
34.    return j;
35. }  // function b
36. 
37. void c ( int k )
38. {
39.    cout << "begin function c: k = " << k << endl;
40.    k = k + 25;
41.    cout << "end   function c: k = " << k << endl;
42. }  // function c