I have question 7 and 8 I need help please help me with solving this question I have the below code and I need to change it to fit question 7 and 8
((code))
#include "lab07a.h"
int main(){ char *type,*readok,*execok,*writeok; char filename[20]; char line[20],temp; printf("enter a file name : "); scanf("%s" , filename); scanf("%c" , &temp); if(stat(filename,&stat1)
please help me to solve them
(in C programming language and Unix)
7- Re-write the C program to use only RIO I/O functions. Do not use Unix LO (for reading or writing) nor C standard I/O functions. Save your source files as "lab07c.c" and "lab07c.h" a. Add the source files to the report. b. Compile and link the source file to get the executable file "lab07c. Show the commands you have used in your report. c. Run the executable file and show the output in the report Write a C program that reads from the user a name of a file and a directory path. Then the program should search in the path given whether the file name is found or not. If there exists a file with the same name, the program should also check if both files have the same contents. The program outputs the following messages in the following cases: If the found file has a complete match: "Complete match". 8- If only the name matches: "Name match" If the file not found: "File not found." Also the program checks for all possible errors and mistakes and display correct and clear error messages. Do not use any Unix commands in your code. Save your file as as "lab07d.c" and "lab07d.h". d. Add the source files to the report. e. Compile and link the source file to get the executable file "lab07d". Show the commands you have used in your report. Run the executable file several times for all the cases and show the output in the report. f. 7- Re-write the C program to use only RIO I/O functions. Do not use Unix LO (for reading or writing) nor C standard I/O functions. Save your source files as "lab07c.c" and "lab07c.h" a. Add the source files to the report. b. Compile and link the source file to get the executable file "lab07c. Show the commands you have used in your report. c. Run the executable file and show the output in the report Write a C program that reads from the user a name of a file and a directory path. Then the program should search in the path given whether the file name is found or not. If there exists a file with the same name, the program should also check if both files have the same contents. The program outputs the following messages in the following cases: If the found file has a complete match: "Complete match". 8- If only the name matches: "Name match" If the file not found: "File not found." Also the program checks for all possible errors and mistakes and display correct and clear error messages. Do not use any Unix commands in your code. Save your file as as "lab07d.c" and "lab07d.h". d. Add the source files to the report. e. Compile and link the source file to get the executable file "lab07d". Show the commands you have used in your report. Run the executable file several times for all the cases and show the output in the report. f