Answer

Yes indeed! When you write a program that uses an array, the bounds of that array often end up appearing throughout the program. In our tiny example program, the array bound (which is now 12) shows up in three different places. As programs get bigger, it gets harder to keep track of what needs to be changed when an array size changes. A good approach is to set the array bound up as a constant with

verbatim3

and then use the symbolic name throughout.

Return to lesson.