Question: in c estse repor Q3) Write a C program that reads from the user a name of a file and a directory path. The file

in c
estse repor Q3) Write a C program that reads from the user a name of a file and a directory path. The file should exist in the current directory. Then the program should search in the path given whether the file name is found or not. It should search in all subdirectories of the given path. If there exists a file with th e same name, the program should also check if they have the same contents. The program outputs the following messages in the following cases . If the found file has a complete match: "Complete match: file path" the found file has a complete match: "Complete match: file_path.". If only the name matches: "Name match: file path." If the file not found: "File not found." Also the program checks for all possible errors and mistakes and display a correct and clear error messages Save your file as hw3q3. Do not use any unix commands in your code. Include the source file to the report. Show the compilation commands in your report. Test your run several times with all search possibilities and show your tests in the report. ,04) Write a C program that takes two string inputs from the user that represent two file names. The first file contains some integer numbers for input, while the second file will be used for output. Then, open the first file for input and the second file for output. Next, the mairn process creates a child process that shares the two files. The child process counts the even numbers from the input file and save the line: Child process PID: xxxx count number of even numbers- yy" in the output file and terminates. Meanwhile, the parent process counts the odd numbers concurrently, then it reaps the child process. After that, it prints to the output file the line: " Parent process PID: xxxx count number of odd numbers yy". save your file as hw3g4. Show the compilation commands in your report. Test your run several timnes with all earch possilities and tiow your tests in the report. 2 I P ag e
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
