Computers and Technology

IN C LANGUAGE 16.15 Lab 5: filter
Name this program filter. c.
The program takes two command line arguments: the name of an input file and the name of an output file. The program should confirm the input and output files can be opened. If a file cannot be opened, print the error message Cannot open file '' where is the name of the file and return.
fopen() will return 0 if it fails to open a file.
Then, the program will read the file string by string (up to 50 characters in length). If the string consists of only uppercase and lowercase characters, print it.
You can use isalpha(char) declared in ctype. h to check whether a character is a-z or A-Z.
continue and break might be useful.
Don't forget to close your files!
Examples
./a. out example. txt output. txt
example. txt output. txt
The Quick Brown Fox Jumps over the Lazy The Quick Brown Fox Jumps
Old Dog. ALABAMA? over the Lazy Old Roll
Roll Tide!!! P2P 1831 (UA)
./a. out does_not_exist. txt output. txt
Cannot open file 'does_not_exist. txt'

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, Liantic8738
List the five on-board vehicle subsystems
Answers: 1
image
Computers and Technology, 22.06.2019 20:30, fickllyd000
In this lab, you complete a prewritten c program that calculates an employee’s productivity bonus and prints the employee’s name and bonus. bonuses are calculated based on an employee’s productivity score as shown below. a productivity score is calculated by first dividing an employee’s transactions dollar value by the number of transactions and then dividing the result by the number of shifts worked.
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, Braxtonw875
What part of the interface displays the external references contained in a selected cell? the status bar the review tab the scroll bar the formula bar
Answers: 1
image
Computers and Technology, 24.06.2019 02:00, sameh0425
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
Do you know the correct answer?
IN C LANGUAGE 16.15 Lab 5: filter
Name this program filter. c.
The program takes two co...

Questions in other subjects:

Konu
Biology, 28.11.2021 02:10
Konu
Mathematics, 28.11.2021 02:10
Konu
Biology, 28.11.2021 02:10