//this is a program to check whether the entered string is palindrome or not
//Palindrome means reverse of the string equal to original string
// WOW=WOW
#include<stdio.h>
#include<conio.h>
void main()
{
char str[10];
int i,j,flag=0;
printf("\n\nEnter The String: ");
scanf("%s",str);
i=0;
j=0;
while(str[j]!=NULL)
{
j++;
}
while(str[i]!=NULL)
{
if(str[i]!=str[j])
{
flag=1;
break;
}
i++;
j--;
}
if(flag==0)
printf("\n\nThe string is palindrome");
else
printf("\n\nThe string is not palindrome");
getch();
}
//Palindrome means reverse of the string equal to original string
// WOW=WOW
#include<stdio.h>
#include<conio.h>
void main()
{
char str[10];
int i,j,flag=0;
printf("\n\nEnter The String: ");
scanf("%s",str);
i=0;
j=0;
while(str[j]!=NULL)
{
j++;
}
while(str[i]!=NULL)
{
if(str[i]!=str[j])
{
flag=1;
break;
}
i++;
j--;
}
if(flag==0)
printf("\n\nThe string is palindrome");
else
printf("\n\nThe string is not palindrome");
getch();
}