To make external variables in one file available to another file, we need to declare them with the extern storage class. Suppose nameSorter.c is part of a sortem.c program and sortem.c needs to access those values. This would be done with the following declaration:
#include <...>
#include "nameSorter.h"
extern const int listMax;
extern const int stringMax;
...
Note that sortem.c uses the same type declarations found in nameSorter.c but adds the extern keyword. The external variables are declared/allocated in nameSorter.c, and so have file scope in that file and external variable extent. Their linkage scope has been extended to sortem.c so that those variables are now visible throughout that source file. Any other file part of the sortem.c program that might need to use listMax and stringMax would simply need to add the same declaration as a part of its compilation unit.
This can be done in several ways: one is to add...