Answered step by step
Verified Expert Solution
Link Copied!

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, input/output 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
input/output redirection:
> Lab2a.exe lab2a_input.txt > lab2a_output.txt
Turn In
Turn in source code, input file and output file.
image 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 Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions