Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We had gone over Chapter 7.5 File Access and 7.6 Error Handling stderr and exit. Samples are on Canvas in Course Documents, Programs and Data

We had gone over Chapter 7.5 File Access and 7.6 Error Handling stderr and exit. Samples are on Canvas in Course Documents, Programs and Data File.

Assignment: 7-7 Line Input and Output, using fgets using fputs using fprintf using stderr using ferror using function return using exit statements.

Use the program 7-6ErrorHandlingStderrExit.c Programs and Data File. When executing on the command line only this program name, the program will accept keyboard input and display such until the user does control+break to exit the program.

The new code should within only this case situation

if (argc == 1){ /* no args; copy standard input */

Replace line #20 filecopy(stdin, stdout); with new code.

Open and read a text file 7NoInputFileResponse.txt that contains a response message There were no arguments on the command line to be read for file open. If file is empty, then use alternate message "22F Missing file 7-0NoInputFileResponse.txt" advance line.

Make the program output to the text log file a new line starting with formatted abbreviation for Weekday 12-hour clock time formatted as hour:minutes:seconds AM/PM date formatted as mm/dd/yyyy followed by the message "COMMAND LINE INPUT SUCCESSFUL". See example 7-8MiscFunctionsTime

Append that message to a file 7Error_Log_File.txt advance newline.

Remember to be using fprintf, using stderr, using return, using exit statements. Test for existence of 7NoInputFileResponse.txt file when not null print 7Error_Log_File.txt does exist however if null use, otherwise display such message using fprintf stderr and exit.

Upload your .c file your input message file and your text log file.

ON C LANGUAGE!!!!! please!!!

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

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 For Advanced Applications 15th International Conference Dasfaa 2010 International Workshops Gdm Benchmarx Mcis Snsmw Diew Udm Tsukuba Japan April 2010 Revised Selected Papers Lncs 6193

Authors: Masatoshi Yoshikawa ,Xiaofeng Meng ,Takayuki Yumoto ,Qiang Ma ,Lifeng Sun ,Chiemi Watanabe

2010th Edition

3642145884, 978-3642145889

More Books

Students also viewed these Databases questions

Question

Write short notes on Interviews.

Answered: 1 week ago

Question

Define induction and what are its objectives ?

Answered: 1 week ago

Question

Design a training session to maximize learning. page 296

Answered: 1 week ago

Question

Design a cross-cultural preparation program. page 300

Answered: 1 week ago