Answered step by step
Verified Expert Solution
Link Copied!

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;

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions