In the C language, the variable’s scope refers to the part of the program where we reference it. The two types of variables in C are:
Local variables: These are defined within a function body. They are not accessible outside the function.
Global variables. They are defined outside the function body. Thus, they are accessible to the entire program.