/* * ARRAYLIB_H * * The #ifndef, #define and #endif are pre-processor commands to test whether * a symbol ARRAYLIB_H has been defined and if so - skip the whole block * else compile it. After the first time this file is compiled, the symbol * ARRAYLIB_H gets defined and the file will never get compiled again. * * This prevents redundant compilation which results in possible redefinition * of functions and resulting compilation errors. * * The #ifndef mechanism relieves the programmer from having to worry about * whether a file that has been #include'd in multiple places is compiled only * once. */ #ifndef ARRAYLIB_H #define ARRAYLIB_H void swapInts(int *a, int *b); void copyArray(int a[], int aLen, int b[], int bLen); void swapArrays(int a[], int aLen, int b[], int bLen); void printArray(int arr[], int arrLen); #endif