Solved

Which of the Following Statements About Global Variables Is True

Question 14

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents