/*program to find palindrome*/ #include<stdio.h> #include<conio.h> #include<string.h> void main() { char a[30],str[30]; clrscr(); printf("Enter a string\n"); scanf("%s",&str); strcpy(a,str); strrev(a); if(strcmp(str,a)==0) printf("String is palindrome\n"); else printf("String is not palindrome\n"); getch(); }
Learn something about IT