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
Có n chiếc kẹo và m em bé. Hãy viết chương trình nhập vào hai số nguyên dương n, m và kiểm tra n chiếc kẹo có chia đều được cho
sleet_krkn [62]

uy ako ba yung pilipino dito hi nga kau

5 0
2 years ago
What is this tool called?
kondor19780726 [428]
Is there a picture????????
4 0
3 years ago
Read 2 more answers
Select the steps for adding artwork into a placeholder on a presentation slide
Sloan [31]

Answer:

   Open the presentation that you want to add a slide to.

   In the pane that contains the Outline and Slides tabs, click Slides, and then click where you want to add a slide.

Explanation:

6 0
3 years ago
. Why use a sensitivity analysis?
Natali [406]

Answer:

 Sensitivity analysis is the method in which it basically predict the final outcome of the decision. It analysis each variable individually and identify the dependency of the output value on the particular value of the input.  

The advantage of the sensitivity analysis is that it reduce the overall risk of the particular strategy and also impact of the system.

It basically work on the basic principle that firstly changed the structure and model and then observe the particular behavior of the model.

7 0
3 years ago
What is cryptocurrency ? I need to do a research one it please help!
icang [17]

A cryptocurrency is a digital asset designed to work as a medium of exchange that uses strong cryptography to secure financial transactions, control the creation of additional units, and verify the transfer of assets.

8 0
3 years ago
Other questions:
  • Theâ ______ is a large worldwide collection of networks that use a common protocol to communicate with one another.
    5·1 answer
  • ) how many bits are used for host number on the child network (subnet) , b) how many usable addresses can exist on this child ne
    9·1 answer
  • Given two variables matric_age and grad_age, write a statement that makes the associated value of grad_age 4 more than that of m
    15·1 answer
  • Assume that strikeCounter has already been declared to be a "pointer to int". Assume further that strikeCounter has been initial
    5·1 answer
  • The first numerical control machine tool was demonstrated in 1952 in the United States at the Massachusetts Institute of Technol
    14·1 answer
  • What constructs break or bend the normal Syntax patterns of scheme?
    15·1 answer
  • I want to get an output picture in python but it says this. I'm using turtle
    12·1 answer
  • A summer camp offers a morning session and an afternoon session. The list morningList contains the names of all children attendi
    6·1 answer
  • Plz help Complete the sentence.
    11·2 answers
  • Is Using programming libraries is one way of incorporating existing code into new programs true
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!