Viewing code of PALINDCT
// ------ ../cgi-bin/cout/PALINDCT.CPP --------------
//--- Programmed By Rajesh -----

#include<ctype.h>
#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{ char a[25],b[25];
int length,rev=0,check=1;
clrscr();
printf("enter a word");
scanf("%s",a);
length=strlen(a);
/* for(int j=0;j<length;j++)
{
a[j]=toupper(a[j]);
}
*/
for(int i=length-1;i>=0;i--)
{
b[rev]=a[i];
if (b[rev]!=a[rev])
{
check=0;
printf("the word is not palindrome");
break;
}
rev++;
if (check==1)
printf("\n the word is palindrome");
getch();
}
}