The scope of local variables will be within the function only. These variables are declared within the function and can’t be accessed outside the function.
The scope of global variables will be throughout the program. These variables can be accessed from anywhere in the program. This variable is defined outside the main function. So, this variable is visible to main function and all other sub functions.
Environment variable is a variable that will be available for all C applications and C programs. We can access these variables from anywhere in a C program without declaring and initializing in an application or C program.
total answers (1)
start bookmarking useful questions and collections and save it into your
own study-lists, login now to start creating your own collections.