Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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 Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

I need help with filling the blank at the bottom

Answered: 1 week ago

Question

1. Does your voice project confidence? Authority?

Answered: 1 week ago