#include<stdio.h>intmain(){int length, isPalindrome =1;char str[100], rev_str[100];printf("Enter string: ");scanf("%s", str);// Find the length of the stringfor(length =0; str[length]!='\0'; length++);printf("%d", length);// Check if its palindromefor(int i =0; i < length /2; i++){if(str[i]!= str[length - i -1]){ isPalindrome =0;break;}}// Print the resultif(isPalindrome)printf("The string is a palindrome");elseprintf("The string is not a palindrome");}