Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ (2) Write a function that takes two strings and returns true, regardless of case, if one string is the reverse of the other, i.e.,

c++image text in transcribed

(2) Write a function that takes two strings and returns true, regardless of case, if one string is the reverse of the other, i.e., bool isReverseIgnoreCase (const char* S, const char* t) ; Example: (2a) isReverse ("abcde", "'edcba") would return true, but (2b) isReverse ("abcde ", "edCba") would return true, and (2c) isReverse ("hello", "world") would return false (3) Write a function that can print out a center-justified string (use the below words from the song "Writing's On The Wall, by Sam Smith). You might want to use d at first when testing your code, to make it easier to see the spaces. If you do, be sure to remove the 1." before you Submit your code. void center Justify(const char* str , size_t length) ; int main(O) { size t size = 55 center Justify (" i 've ", size) ; II input strings center Justify" been here ", size) ; center Justify" before, but always", size); center Justify"hit the floor. 've spent", size) ; center Justify("a lifetime running, and i always", size) ; center Justify ("get away, but with you i'm feeling something", size); center Justify" that makes me want to stay", size) ; center Justify("i 'm prepared for this ", size); center Justify(" i never shoot", size) ; center Justify("to miss ", size); center Justify ("sam Smith", size)

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 Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

1. Why was the RISC architecture concept proposed?

Answered: 1 week ago

Question

Understand highlights of legislation enacted in 1964 and beyond

Answered: 1 week ago