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
seraphim [82]
4 years ago
13

A palindrome is a string that reads the same forwards or backwards; for example dad, mom, deed (i.e., reversing a palindrome pro

duces the same string). Write a recursive, bool-valued function, isPalindrome that accepts a string and returns whether the string is a palindrome. A string, s, is a palindrome if: s is the empty string or s consists of a single letter (which reads the same back or forward), or the first and last characters of s are the same, and the rest of the string (i.e., the second through next-to-last characters) form a palindrome.
Computers and Technology
1 answer:
Vadim26 [7]4 years ago
3 0

Answer:

Explanation: Palindrom.c

#include <stdio.h>

#include <string.h>

int isPalindrome (char s[],int l);

int main()

{

char s[15];

printf("Enter a string: ");

scanf("%s", s);

int result = isPalindrome(s, strlen(s));

if(result){

printf("Palindrome\n");

}

else{

printf("Not a palindrome\n")

}

return 0;

}

int isPalindrome (char s[], int l)

{

if (l<=0)

return 1;

if (s[0] == s[l-1])

{

return isPalindrome (s+1, l-2);

}

else return 0;

}

You might be interested in
The gene form of a trait is called a(n) ​
Rom4ik [11]

Answer:

alleles

Explanation:

7 0
4 years ago
Match the careers with the education required for each job
Gekata [30.6K]
Statistician for the last one network administaror for the next one then animator then broadcast tech
6 0
3 years ago
_____ rows indicate that there is different formatting for odd and even rows.
Sladkaya [172]
Banded rows indicate that there are different formatting for odd and even rows.
5 0
3 years ago
Which of the following is a list of input devices?
charle [14.2K]
The Correct answer would be C. <span>microphone,mouse,scanner

microphone you talk into to give info (data)

a mouse you use to click on objects  to give input 

a scanner you input a paper/object 

hope this helps!! :)


</span>
7 0
3 years ago
Your worksheet has the value 27 in cell B3. What value is<br>returned by the function =MOD(B3,6)?​
Digiron [165]

Answer:

3

Explanation:

MOD means the remainder after a division calculation.

\frac{27}{6}= 4r3

The remainder is 3

5 0
3 years ago
Other questions:
  • Write an interactive Python calculator program. The program should allow the user to type a mathematical expression, and then pr
    13·1 answer
  • You are part of the team to implement new software at XYZ Inc. The employees at XYZ Inc. trust the results of the old software p
    5·1 answer
  • Do you think our attitude (whether positive or negative) is something we are born with or that we have power to control within o
    5·2 answers
  • Which best describes obliteration in a forged document?
    11·1 answer
  • _____________ helps to control and limit the number of consecutive request failures that cross a threshold. Review breaker Micro
    7·1 answer
  • Please help! I tried this by myself. But I am not sure if this is right.
    8·2 answers
  • I get brainlist to whoever can help my computer is doing this and I have class and it’s not working and I got it wet yesterday b
    12·2 answers
  • Match the elements used in web searches to their functions.
    12·1 answer
  • rue or false: The first web browser was introduced to the public in the 1970s and started the explosive growth of the Internet i
    15·1 answer
  • What are the features of the title bar for the Microsoft word application?​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!