1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
SCORPION-xisa [38]
3 years ago
9

Write a program that uses the function isPalindrome given in Example 6-6 (Palindrome). Test your program on the following string

s:
madam, abba, 22, 67876, 444244, trymeuemyrt

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

The isPalindrome function from Example 6-6 has been included below for your convenience.

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;
} // if
} // for loop
return true;
}// isPalindrome

Your program should print a message indicating if a string is a palindrome:

madam is a palindrome
Computers and Technology
1 answer:
WITCHER [35]3 years ago
3 0

Answer:

Explanation:

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;

         }

    }

cout << str << "is a palindrome";

return true;

}

You might be interested in
What information should be included in the closing paragraph of a thank-you letter? a. Mention skills that were omitted during t
stiks02 [169]
The answer is c and sorry for being so rude I didn't realize it was you girly

3 0
4 years ago
Read 2 more answers
What kind of device does a computer need to provide information to a person or something else?
yanalaym [24]
An input device is something that gives information to the computer. On the other hand, an output device is something that gives you information.
7 0
4 years ago
Read 2 more answers
5.Give an example of a situation in which ordinary pipes are more suitable than named pipes and an example of a situation in whi
rodikova [14]

The use of ordinary pipes is effective when you want to establish communication between two processes on the same machine. The use of named pipes is more suitable when you want to establish communication with a network.

<h3 /><h3>What is a pipe?</h3>

Corresponds to a unidirectional communication technique between processes with a common ancestor in Linux and UNIX operating systems. Each pipe is able to communicate by sending a sequence of bytes to the other system.

Therefore, to communicate with a network, it is necessary to use named pipes that are used for requests from other processes similar to TCP/IP ports.

Find out more information about computer programming here:

brainly.com/question/23275071

4 0
3 years ago
A(n ____ is a data structure that stores all information (such as file permissions, ownership, and file type about a file except
saveliy_v [14]
Inode

http://www.linfo.org/inode.html

6 0
3 years ago
Which shortcut key is used to make a duplicate of a slide?<br><br><br>​
Rudiy27
Ctrl+D to duplicate
6 0
3 years ago
Other questions:
  • How do I give extra points on Brainly
    6·2 answers
  • What is the name of the keyboard developed in the 1930s?
    13·1 answer
  • Write a program that uses these bounds and bisection search (for more info check out the Wikipedia page on bisection search) to
    8·1 answer
  • Create a stored procedure sp_Q1 that takes two country names like 'Japan' or 'USA'as two inputs and returns two independent sets
    10·1 answer
  • Explain agile testing ​
    11·1 answer
  • Lian is asked to create a variable that will keep track of how many times the user has tried to enter their password. What kind
    9·1 answer
  • Question, who wants 100 points?
    10·2 answers
  • What information is contained in the title bar
    13·1 answer
  • WHAT DO U MEANS BY DIGITAL PROFILE​
    15·1 answer
  • You have studied graphic design, advanced math, and programming, and you
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!