Name this program filter.c. • The program takes two command line arguments: the name of an input file and the name of an

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Name this program filter.c. • The program takes two command line arguments: the name of an input file and the name of an

Post by answerhappygod »

Name This Program Filter C The Program Takes Two Command Line Arguments The Name Of An Input File And The Name Of An 1
Name This Program Filter C The Program Takes Two Command Line Arguments The Name Of An Input File And The Name Of An 1 (54.14 KiB) Viewed 9 times
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 '<filename>' where <filename> is the name of the file and return. o 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. o continue and break might be useful. • Don't forget to close your files! It will likely fail the test cases if files are not closed. Examples ./a.out example.txt output.txt example.txt The Quick Brown Fox Jumps over the Lazy Old Dog. ALABAMA? Roll Tide!!! P2P 1831 (UA) output.txt The Quick Brown Fox Jumps over the Lazy Old Roll
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply