subject

C++
a. Write a program that uses the function isPalindrome given in example 6-6 (Palindrome). Test your program on the followinng strings: "madam", "abba", "22", "67876", "444244", and "trymeuemyrt"

b. Modify the function isPalindrome of example 6-6 so that when determining weather a string is a palindrome, cases are ignored, that is, uppercase and lowercase letters are considered the same.

Example 6-6:
bool isPalindrome (string str)
{
int length = str. length();
for (int i = 0; i < length / 2; i++)
if (str[i] != str[length - 1 - i];
return false;
return true;
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 25.06.2019 02:30
What group of plants produce fruit? question 2 options: gymnosperms nonvascular plants seedless vascular plants angiosperms
Answers: 1
question
Computers and Technology, 25.06.2019 07:20
Acompany's intranet is set up on this type of server. application communication print web
Answers: 1
You know the right answer?
C++
a. Write a program that uses the function isPalindrome given in example 6-6 (Palindrome)....
Questions
question
Social Studies, 21.07.2021 02:10
question
Computers and Technology, 21.07.2021 02:10
question
Computers and Technology, 21.07.2021 02:10
question
Mathematics, 21.07.2021 02:10
Questions on the website: 13722361