Solved

Which of the Following Statements About Global Variables Is True

Question 20

Multiple Choice

Which of the following statements about global variables is true?


A) A global variable is accessible only to the main function.
B) A global variable is declared in the highest-level block in which it is used.
C) A global variable can have the same name as a variable that is declared locally within a function.
D) If a function contains a local variable with the same name as a global variable, the global variable's name takes precedence within the function.
E) All of these are true.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions