Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 *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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started