Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Starter Code: #include #include #define SIZE 40 int isPalindrome (char *); void printReverse (char *); int main () { int result; char c; int i;
Starter Code: #include#include #define SIZE 40 int isPalindrome (char *); void printReverse (char *); int main () { int result; char c; int i; int count=0; char arr[SIZE]; fgets(arr,SIZE,stdin); while ( ) { arr[strlen(arr)-1] = '\0'; // remove the trailing // print backward printReverse(arr); result = isPalindrome (arr); if (result==1) printf (" Is a case-insensitive palindrome. "); else printf (" Not a case-insensitive palindrome. "); fgets(arr,SIZE,stdin); } return 0; } int isPalindrome (char * str) { } // assume the was removed manually void printReverse(char * str){ int i = strlen(str) -1; while ( i >=0 ){ printf("%c", *(str+i) ); // or putchar(*(str+i)); i--; } }
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