Q:

WHAT IS THE SCOPE OF LOCAL, GLOBAL AND ENVIRONMENT VARIABLES IN C?

0

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now