... is true, line 23 returns
number. Interestingly, if
number is greater than 1, the recursion step (line 26) generates two recursive calls, each for a slightly smaller problem than the original call to
Figure 6.27 shows how function
fibonacci would evaluate
fibonacci(3). This figure raises some interesting issues about the order in which C++ compilers evaluate the operands of operators. This is a separate issue from the order in which operators are applied to their operands, namely, the order dictated by the rules of operator precedence and associativity. Figure 6.27 shows that evaluating
fibonacci(3) causes two recursive calls, namely,
fibonacci(1). In what order are these calls made?