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
Get step-by-step solutions from verified subject matter experts
