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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 23:30, huangjianhe135
The keyboard usually has six rows of keys. which of the following is not one of the key group categories? letter keys number keys control keys graphic keys
Answers: 1
image
Computers and Technology, 24.06.2019 15:50, coralaguilar1702
Andy would like to create a bulleted list. how should he do this? andy should click on the bullet icon or select the bullet option from the menu and then type the list. andy should press the shift key and the 8 key at the beginning of each line of text. andy should type the text and then click on the bullet command. andy should press return and the bullets will automatically
Answers: 2
image
Computers and Technology, 24.06.2019 23:30, binkyv15
Adrian has decided to subscribe for a new internet connection. he wants a high speed connection so that he can stream video content smoothly. which access technology would you advise adrian against using?
Answers: 1
image
Computers and Technology, 25.06.2019 04:30, Teedollasign
Which relativos possible when two tables share the same primary key? a.) one-to-one b.) one-to-many c.) many-to-one d.) many-to-many
Answers: 2
You know the right answer?
C++
a. Write a program that uses the function isPalindrome given in example 6-6 (Palindrome)....

Questions in other subjects:

Konu
Mathematics, 17.11.2020 04:30
Konu
Mathematics, 17.11.2020 04:30