Program:
#include<stdio.h>#include<conio.h>void main(){char str[20);char temp[20];puts (“Enter any word”);gets (str);strcpy (temp, str);strrev (str);if (strcmp (str, temp) == 0){printf (“it is a palindrome”);}else{printf (“it is not a palindrome”);}}
Your experience on this site will be improved by allowing cookies. Read Cookie Policy