[prev] 78 [next]

Exercise 11: Using Function Pointers

Write a function that:
  • applies several simple functions on a range of numbers
  • by storing the functions in an array
  • and iterating over the array
Use the functions:
  • int decrement(int)    (n-1)
  • int doublify(int)    (2*n)
  • int factorial(int)    (n!)
  • int fibonacci(int)    (1,1,2,3,5,8,...)