#include<stdio.h> #include<string.h> #define size 26 void main() { char strsrc[size]; char strtmp[size]; clrscr(); printf("\n Enter String:= "); gets(strsrc); strcpy(strtmp,strsrc); strrev(strtmp); if(strcmp(strsrc,strtmp)==0) printf("\n Entered string \"%s\" ispalindrome",strsrc); else printf("\n Entered string \"%s\" is not palindrome",strsrc); getch(); }
|