68.7k views
5 votes
Objects with a global scope are visible everywhere in the program.
a) True
b) False

User Royland
by
8.3k points

1 Answer

5 votes

Final answer:

True, objects with a global scope are visible everywhere in a program, allowing access from any part of the code.

Step-by-step explanation:

Objects with a global scope are indeed visible everywhere in the program, so the correct answer to the student's query is a) True. In many programming languages, when an object or variable is declared in the global scope, it means that it can be accessed by any other part of the code, not just the block or function in which it was declared. This is different from local scope, which restricts visibility to the declaring block only. However, it's important to manage global objects carefully, to avoid programming errors and ensure good design practices.

User Suet
by
8.9k points