Question
Write a C or C++ program called myFind.c or myFind.cpp which replicates a small subset of the functionality of the find system utility. In particular,
Write a C or C++ program called myFind.c or myFind.cpp which replicates a small subset of the functionality of the find system utility. In particular, the output of your program should be identical to executing the following: $ find . -type f The above command recursively finds all files in the current directory and prints them one line at a time to the standard output. In your implementation you may use the following system calls: opendir(), closedir(), readdir() printf() and/or std::cout Your program should take no command line arguments. If you are comfortable with recursion, you may implement a recursive solution, and if not, you can implement an iterative solution using a stack. The order of the filenames reported by your program does not have to be identical to that of find, but it has to report the same set of filenames.
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