#include #include #include void main(void) { char stc[128]; int i=0,j=0,flag=1; clrscr(); printf("Enter the string to check for palindrome\n"); gets(stc); while(stc[j]!='\0') j++; //length of string is final j j--; for(i=0; i < (j/2+1) ; i++) { if(stc[i]!=stc[j-i]) { printf("\nSTRING IS NOT A PALINDROME"); flag=0; break; } } if(flag) puts("STRING IS A PALINDROME"); delay(2500); }