Chapter 3: Problem 20
What is a global constant? Is it permissible to use global constants in a program?
Short Answer
Expert verified
Answer: Yes, it is permissible to use global constants in a program. They can be useful when a constant value is needed throughout a program. However, it's important to use them judiciously to avoid making the code difficult to understand, maintain, and scale. Appropriate scenarios for using global constants include constants related to mathematical operations, configuration values that don't change during the execution of the program, and constants for units conversions or lookup tables that do not change throughout the execution of the program.