Local Variables

  1. Variables that are declared within the body of a function are local to that function and have that function as their scope.

  2. Call-by-value parameters of a function are also local variables of the function.

  3. Local variables can only be accessed within their scope.

  4. The variables we have considered thus far are all local variables, each having a specific scope.

  5. However, C++ allows you to use global constants and global variables.