Question: 6) Consider the function countEntries(), whose prototype follows: void countEntries (char *dirName, int *nFiles, int *nDirs) The parameter named dirName points to a character string,

 6) Consider the function countEntries(), whose prototype follows: void countEntries (char

6) Consider the function countEntries(), whose prototype follows: void countEntries (char *dirName, int *nFiles, int *nDirs) The parameter named dirName points to a character string, providing the name of a directory to be recursively explored for files and subdirectories. You may assume that dirName, and its subdirectories, contain only files and directories. After countEntries) has explored everything below the named directory, the parameters nFiles and nDirs should provide, to the calling function, the number of files and directories found, respectively. If countEntries) finds a directory that cannot be opened, it should report an error and continue its processing (i.e. the function should not exit on such an error) Write the function countEntries () in C99

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!