Answered step by step
Verified Expert Solution
Link Copied!

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,

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions