Scope of a variable is its lifetime in the program.
The region of the program in which it can be accessed.
The scope of a variable inside a function is only limited to the function itself.
Accessing such variable outside of the function results in warning.
Let's look at the following example: