Which Of The Following Statements About Global Variables Is True?

(Correct Answer Below)

Reveal the answer to this question whenever you are ready.

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.
Front

Advertisement

c. (A global variable can have the same name as a variable that is declared locally within a function.)

About the flashcard:

This flashcard is meant to be used for studying, quizzing and learning new information. Many scouting web questions are common questions that are typically seen in the classroom, for homework or on quizzes and tests. Flashcards vary depending on the topic, questions and age group. The cards are meant to be seen as a digital flashcard as they appear double sided, or rather hide the answer giving you the opportunity to think about the question at hand and answer it in your head or on a sheet before revealing the correct answer to yourself or studying partner. Some questions will include multiple choice options to show you the options involved and other questions will just have the questions and corrects answers. Simply reveal the answer when you are ready to check your work. Absolutely no cheating is acceptable.