UMBC CMSC 201 Fall '05CSEE | 201 | 201 F'05 | lectures | news | help |

- The
**Factorial**function is defined outside of the**main**function.

- The main function declares one variable: "i".
- The Factorial function declares two variables: "product" and "i".

In general, when inside a function, you can only refer to the
variables declared within it, its **local variables**. The formal
parameters of a function are also local variables that may be used
within that function.

What happens if we have two variables with the same name? -- You will
always be using the **local** one.

CSEE | 201 | 201 F'05 | lectures | news | help