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
Which of these is NOT an example of lifelong learning?
oee [108]

Answer:

B. having lunch with a friend

Explanation:

Lifelong learning can be defined as a continuous, self-motivated, and self-initiated learning activity that is typically focused on personal or professional development. Thus, it's a form of education that is undertaken throughout life with the sole aim of pursuing knowledge, competencies, and skills for either personal or professional growth and development, especially after acquiring a formal education.

Some examples of lifelong learning includes the following;

I. Reading a trade magazine.

II. Reviewing a textbook.

III. Studying an encyclopedia.

7 0
3 years ago
Write a program using integers userNum and x as input, and output userNum divided by x four times. Ex: If the input is: 2000 2
STatiana [176]

Answer:

// here is code in c++.

// include header

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variables to read input

   int userNum,x;

   cout<<"enter the value of userNum and x :";

   // read the input from user

   cin>>userNum>>x;

   // divide the userNum with x 4 times

   for(int a=0;a<4;a++)

   {

       userNum=userNum/x;

       cout<<userNum<<" ";

   }

       cout<<endl;

return 0;

}

Explanation:

Declare two variables "userNum" and "x". Read the value of these. Run a for loop 4 time and divide the "userNum" with "x" and print  the value of "userNum".

<u>Output:</u>

enter the value of userNum and x :2000 2                                                                                  

1000 500 250 125  

3 0
3 years ago
An arrangement in which local businesses team up with schools, hiring students to perform jobs that use knowledge and skills tau
Kazeer [188]

It is called a Cooperative program

A Cooperative program refers to a combination of both academic study and vocational activities in one curriculum of education. The purpose of this program is to provide the students with both knowledge in theory and practical skills that make them more prepared in the real world.


4 0
4 years ago
Read 2 more answers
What information and options can be found on the File tab? Check all that apply. a) page margins b) author of the document c) sc
inessss [21]

The answer is B, C, D, E.

b) author of the document c) scrollbar settings d) saving a file e) opening a file.

File tab in Microsoft Word is a section that gives you access to file functions like open, save, close, word options, and recent file documents. Open, Save options, and the author of the document can be found right after you click the file tab. However, the Scroll Settings can be found on Options of the File tab.

6 0
3 years ago
Read 2 more answers
A is a way for students to keep track of information during research
Ilya [14]
The choices are a) credible website B)search log c) Boolean operator d) online database.

The answer is, d. Online database. There are already numerous online digital tools that can aid research. Examples are readcube, mendeley, google scholar. It helps you save and organize researches as well as automatically give bibliographies according to your need like APA and MLA. These tools can hold and save different information that researchers need.
6 0
3 years ago
Other questions:
  • Which of the following is NOT a way the media communicates unrealistic body images?
    10·2 answers
  • Before responding to an e-mail from another student in an online course, a student should
    13·2 answers
  • The hardware to keep the output data when finished is a
    9·1 answer
  • What is the relationship between agile teams and project requirements
    9·1 answer
  • Which of the following statements holds true for the term plug-in? Group of answer choices It refers to a program (typically a m
    11·1 answer
  • Why does it keep saying this when I’m putting my right credit card number
    6·1 answer
  • Davingould1115...................answer 3​
    11·1 answer
  • You have just received a generic-looking email that is addressed as coming from the administrator of your company. The email say
    8·1 answer
  • Does anyone know how many Brainliests you need to be able to send a private message to someone??
    10·2 answers
  • Which term refers to the science that specifies the design and arrangement of items you use so you interact with the items effic
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!