Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you code this in C please? Thank you change the case of alphabetic characters, print two spaces every time you encounter a space, and

image text in transcribed

Can you code this in C please? Thank you

change the case of alphabetic characters, print two spaces every time you encounter a space, and if you have multiple empty lines in a row, sin Inst print just one empty line avoid printing the rest. Specifically, for each character you read, do one of the following 4 things: 1) delete all digits (the characters 0, 1, 2, . . ., 9); that is, read it in, Doc nam Exp use but then don't print it if was a digit If mak 2) Interchange the case of the alphabetic letters; that is, if you encounter an 'A', print out an 'a' instead, 'B' becomes 'b', etc. - and likewise, 'a' becomes 'A'. 'z' becomes 'Z'. The you Ove 3) Every time a space character is encountered (ASCII code 32), print bet two spaces instead of just the one. If co su to no 4) When you find consecutive empty lines, print just one empty line. For simplicity, we will distinguish between 'blank' and 'empty' ' empty' means "no characters except for a newline" -a line consisting of three tabs looks* blank, but it contains 3 characters, so it will not be considered empty. Essentially, this rule simply means "if you see a bunch of CONSECUTIVE newlines, print just ene newline. Dc 5) All other characters not mentioned above (such as tabs, control ir ir di S C characters, or whatever) are simply printed verbatim. Your main program should return a value when it finishes. Return one (1) if the

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions