Originally Posted by
vart
also it is a good practice to put with the array - the array length as a second parameter
in this case your printStrings function does not need to know that arrays are declared with STRING_COUNT constant
also when fgets returns null it could be not due to error but due to EOF condition, so maybe user just does not want to enter all 5 srings and will stop after 3 (he can emulate EOF pressing Ctrl+Z if I remember)
so in this case you also may want to proceed the actual number of received strings, and not the preallocated number - so passing the number of filled array members will also help to solve this problem