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
Eduardwww [97]
3 years ago
13

A palindrome is a string that reads the same both forward and backward. For example, the string "madam" is a palindrome. Write a

program that uses a recursive function to check whether a string is a palindrome. Your program must contain a value-returning recursive function that returns true if the string is a palindrome and false otherwise. Do not use any global variables; use the appropriate parameters.
Computers and Technology
1 answer:
MatroZZZ [7]3 years ago
8 0

// this function will return 1 if the string sent in arguments is palindrome //else it will return 0

int palindrome(int start_of_string, int end_of_string, string &strr)

{

// base case to check if the string is not empty

if (start_of_string>= end_of_string)

   return 1;

if (strr[start_of_string] != strr[end_of_string])

    return 0;

// recursive call

return palindrome(++start_of_string, --end_of_string, strr);    

}

You might be interested in
Are commonly used to control the number of times that a loop iterates?
pickupchik [31]
Hmm... I feel like this query is much broader than it should be. However, I will start my initial answer, then another potential solution.

My initial answer to your query was: A condition controlled loop is used to control the number​ of times a loop iterates.

The potential answer, my secondary one, is: A count controlled loop iterates a specific number of times.

Two results, but my initial answer is the solution I opted when understanding this.
5 0
2 years ago
Two types of business communications enhanced by desktop publishing are
Likurg_2 [28]
The correct option is D.
The two types of business communication that are enhanced by desktop publishing are internal and external communication. Internal communication refers to the information and ideas that are exchange within the organisation while external communication refers to information and ideas that are exchange between the organisation and the outside world.<span />
4 0
2 years ago
Read 2 more answers
Mary is writing an article about the animal kingdom. She wants to place an image below the text. Which menu should Mary choose f
diamong [38]

Answer:

Idk

Explanation:

Idk

8 0
3 years ago
Which type of address is the ip address 232. 111. 255. 250?.
svp [43]
I think it’s a multicast
8 0
2 years ago
Computer networks make setting appointments easier by _____.
Sunny_sXe [5.5K]

Probably providing a common calendar

5 0
3 years ago
Read 2 more answers
Other questions:
  • You're working at a large industrial plant and notice a tag similar to the one shown in the figure above. Which of the following
    5·1 answer
  • The negotiators past relationship will affect current behavior if the parties
    12·1 answer
  • Which windows tool can you use to find out if the hard drive is slowing down windows performance?
    9·1 answer
  • Write a Java application that inputs a series of 10 integers and determines and prints the largest and smallest integer. Use a c
    12·1 answer
  • In this part, you have to implement a linked list that maintains a list of integers in sorted order. Thus, if the list contains
    13·1 answer
  • To more easily incorporate methods into a program, it is common practice to store methods in their own classes and files. Then y
    6·1 answer
  • The ash and dust from a volcanic eruption can cause a ______ change in the environment.
    8·1 answer
  • When a JSP page is compiled, what is it turned into?
    11·1 answer
  • What is the answer 11100+01010​
    8·1 answer
  • In 1868 the qwerty keyboard was patented by this man
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!