Chapter 3: Problem 20
Give one good reason that you should not use global variables in a program.
Short Answer
Expert verified
Answer: A critical issue with using global variables is that they can lead to unintended side effects and make debugging difficult, as any part of the program can access and modify their values. To avoid this issue, one should use local variables and pass values through function arguments, which limits the scope of variables and makes the code easier to understand and debug.