Identify the correct statement regarding scope of variables.
A. Global variables are declared in a separate file and accessible from any program.
B. Local variables are declared inside a function and accessible within the function only.
C. Global variables are declared inside a function and accessible from anywhere in program.
D. Local variables are declared in the main body of the program and accessible only from functions.
Answer:B
Identify the correct statement regarding scope of variables.
A. Global variables are declared in a separate file and accessible from any program. B. Local variables are declared inside a function and accessible within the function only. C. Global variables are declared inside a function and accessible from anywhere in program. D. Local variables are declared in the main body of the program and accessible only from functions.