Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C program Write a program to remove trailing blanks and tabs. Write pseudo code for the program trim.c before trying to write the code itself.

C program

Write a program to remove trailing blanks and tabs.

Write pseudo code for the program trim.c before trying to write the code itself. When you write trim.c, include the pseudo code in your comments at the beginning of the file. Compile it to be the executable program trim. Trailing blanks and tabs are defined as blanks and tabs that precede an character or an EOF to terminate a line, without any intervening characters of other kinds. You should copy a getline() function of the kind you see in the text to read in lines from stdin into an array, trim the line, and then write out the trimmed line to stdout, continuing until you encounter an EOF. Note: If there are 4 non-blank lines in the input to trim, there should be 4 lines in the output, but lines consisting of only blanks, and tabs, should NOT be output. The trim function should NOT affect any blanks or tabs that do not come at the end of the line.

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

Write down the circumstances in which you led.

Answered: 1 week ago