i need to make my program here do a palindrome with a word. heres my code. this programs capitalizes the first letter in each word , but i want it to do a palindrome on the final answer. please can you help me.
Code:#include<stdio.h> #include<ctype.h> /*program begins here*/ int main() { /**/ char string[100]; char *ptr = string; /*shws the user what to do*/ printf("Enter string and use a space after a fullstop\n"); /*gets the string that was entered*/ gets(string); /* looks at the first letter of string */ *ptr = toupper(*ptr); /* going through the string entered*/ while(*ptr) { if( isspace(*ptr) ) { *(++ptr) = toupper(*ptr); } ++ptr; } /*shows user the new string*/ printf("your new string is %s\n",string);