I can think of the following reasons:
- Avoid magic numbers. The constant will have a descriptive name like "MAX_MEASUREMENTS" so it can be inferred what the array size really means.
- Avoid duplication. There could be some related code (e.g., code that checks if an index is within the array bounds) that can benefit from using the same constant. Then it makes sense to tie them together such that if you change the constant, you're actually changing all its occurrances.
- Central configuration. By placing all your constants in a centralized place in the code, it is clear to see where your configuration resides. This is easier than having magic numbers scattered throughout the code.
Answer:
Hardware layer
Explanation:
The hardware layer's job is to maintain and put to action central processor units and memory. Hardware layer first check the availability of the for mentioned duo and then decides the need to put one or another into action. Physical and data link layers act the same in the hardware layer. They bot are waiting to be called in action
Answer:
yes that is correct
Explanation:
hopefully this helps good luck