Question
// Problem 7: isPalindrome (10 points) // Return 1 if string s is palindrome. // Parse through the string to check if 1st char==last char,
// Problem 7: isPalindrome (10 points) // Return 1 if string s is palindrome. // Parse through the string to check if 1st char==last char, 2nd char == (last-1) char, and so on.. // Return 1 if string is palindrome. Return 0 if string is not palindrome. // A palindrome is a sequence of characters which when reversed, is the same sequence of characters. // Palindrome string examples: rotor, noon, madam // Note: you may use reverseOneString() here but it is not necessary to use it. int isPalindrome(char s[STRING_LENGTH]) { char *p = s; int palindrome = 1; // edit if needed // enter code here
return palindrome; }
// Problem 7: ispalindrome (10 points) | // Return 1 if string s is palindrome. // Parse through the string to check if 1st char==last char, 2nd char == (last-1) char, and so on.. // Return 1 if string is palindrome. Return @ if string is not palindrome. I/ A palindrome is a sequence of characters which when reversed, is the same sequence of characters. // Palindrome string examples: rotor, noon, madam | // Note: you may use reverseOneString here but it is not necessary to use it. Fint isPalindrome(char s[STRING_LENGTH]) char *p = s; int palindrome = 1; // enter code here // edit if needed return palindrome
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started