Programming Exercises

1:A palindrome is a string that is the same backward as it is forward. For example, "tot" and "otto" are rather short palindromes. Write a program that lets a user enter a string and which passes a reference to the string to a bool function. The function should return true if the string is a palindrome and false otherwise. At this point, don't worry about complications such as capitalization, spaces, and punctuation. That is, this simple version will reject "Otto" and "Madam, I'm Adam". Feel free to scan the list of string methods in Appendix F for methods to simplify the task.
2:Do the same problem as given in programming exercise 1, but do worry about complications such as capitalization, spaces, and punctuation. That ...

Get The Waite Group's C++ Primer Plus, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.