Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming in C Objective To gain expertise in the use of repetition, character processing, input / output redirection and command line. Assignment Write a program
Programming in C
Objective
To gain expertise in the use of repetition, character processing, inputoutput redirection and
command line.
Assignment
Write a program that echoes the input one word per line after removing all spaces,
punctuations, and all blank lines. Use getchar and putchar functions only. You may not use
any string or character handling functions in this program.
Input
Use the following Ogden Nash poem to test your program. Input should have the poem title.
There are multiple blank lines before and after the title. There are multiple blank spaces or tabs
between words. There are multiple blank lines in the text.
The Parsnip
The parsnip, children, I repeat,
is simply an anemic beet,
some people call the parsnip edible;
myself, I found this claim incredible.
Output
One word per line, left justified. Output should not contain punctuation, spaces, newlines.
Run
Create an input file of the poem above. Run the program on the command line using
inputoutput redirection:
Labaexe labainput.txt labaoutput.txt
Turn In
Turn in source code, input file and output file.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started