C Program to Check Whether given String or Number is Palindrome

This C Program is to check whether the given string or number is palindrome or not,a palindrome is a string which can be read same in both direction.the program doesn’t use any predefined string functions to check the string for palindrome
[cc lang=”c”]
#include
main()
{
char a[80];
char c[80];
int size,i,j;
printf(“Enter a String n”);
scanf(“%s”,a);

for(i=0;a[i]!=’’;i++)
{
size=i;
}
j=0;
for(i=size;i>=0;i–)
{
c[j]=a[i];
j++;
}
c[j]=’’;
int flag=0;
for(i=0;i

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *