Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A file, called data, contains some unknown number of lines. Read them all in, and output them as in the example below, with the first

image text in transcribed
A file, called data, contains some unknown number of lines. Read them all in, and output them as in the example below, with the first two characters of each word capitalized If they are alphabetic characters. Implement and use a function called process that takes one argument, a string. This function should not print anything out, but return a string which is the processed string. Call this function from the main body to produce the output below Make sure to write comments as such: To describe the program To describe any particularly complicated logic or loops See an example compilation and execution on the next page with input in bold .To describe the function a1o.cpp data roote 1015 cat data Lorem ipsum dolor sit anet, consectetur adipiscing elit. Nulla id risus nibh. Sed fermentum ante ac lectus luctus molestie Proin vitae ligula finibus, tempor ipsum sed, bibendum nisl. Vestibulum risus urna, dapibus eu auctor sed, egestas in est. Donec elementum arcu leo, at digniasim sapien auctor ut. Suspendisse potenti. a bc1 23 aa bb cc 11 22 33 aaa bbb ccc 111 222 333 alb b2c c2d (roote 10$ g++-Wall-werror-wpedantie.wextra-std-e++11a10.cpp troote 1013 Ja.out Processed string: LOrem IPsum DOlor sIt AMet, COnsectetur ADipiscing ELit. original atring: Lorem ipsum dolor sit amet, consectetur adipiseing elit. Processed string: NU1la ID RIsus NIbh. original string: Nulla id risus nibh. Processed string: SEd FErmentum ANte AC LEctus LUctus MOlestie. original string: Sed fermentum ante ac lectus luctus molestie Processed string: PRoin VItae LIgula FInibus, TEmpor IPsum SEd, BIbendum NISI. original string: Proin vitse 1igula finibus, tempor ipsum sed, bibendum nisi Processed string: VEstibulum RIsuS URna, DApibus EU AUctor SEd, EGestas IN ESt. original string: Vestibulum risus urna, dapibus eu auctor sed, egestas in est. rocessed string: bonec ELezentum ARcu LEO, AT DIgnissim SApien Adctor UT. original string: Donec elementum arcu leo, at digniasim sapien auctor ut. Processed atring: SUspendisse 2otenti original string: Suspendisse potenti. Processed string: ABC 1 2 3 original string: abcl2 3 Processed string: AA 8H Cc 11 22 33 original string: aa bb cc 11 22 33 rocessed string: AAa Bnb cec 111 222 333 original string: aaa bbb ecc 111 222 393 2rocessed string: Alb B2c :2 string: aib bze ez4

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions

Question

What is another name for the standard deviation of the sample mean?

Answered: 1 week ago