119k views
1 vote
T F Overuse of global variables can lead to problems.

1 Answer

0 votes

Answer:

True

Step-by-step explanation:

Global Variables

Variables which are declared outside any function. Any function can use these variables,they are automatically initialized to zero(0).They are generally declared before main() function.

Problems

We can modify the global variable in any function as any function can access it. So it is hard to figure out which functions read and write these variables. Various problems are-

  • No Access Control
  • Concurrency issues
  • Memory allocation issues

User RolandoCC
by
5.3k points