Objectives
In this chapter you’ll:
• Construct programs modularly from functions.
• Use common math library functions.
• Pass data to functions and return results.
• Learn how the function call and return mechanism is supported by the function call stack and activation records.
• Use random number generation to implement game-playing applications.
• Learn how the visibility of identifiers is limited to specific regions of programs.
• Write and use recursive functions.
6.3 Function Definitions with Multiple Parameters
6.4 Function Prototypes and Argument Coercion
6.5 C++ Standard Library Headers
6.6 Case Study: Random Number Generation
6.7 Case Study: Game of Chance; Introducing enum
6.9 Storage Classes and Storage Duration
6.11 Function Call Stack and Activation Records
6.12 Functions with Empty Parameter Lists
6.14 References and Reference Parameters
6.16 Unary Scope Resolution Operator
6.20 Example Using Recursion: Fibonacci Series
3.137.166.124