-->
Showing posts with label WAP to know a number /string is Palindrome or not.. Show all posts
Showing posts with label WAP to know a number /string is Palindrome or not.. Show all posts

WAP to know a number /string is Palindrome or not.

// WAP to know a number /string is Palindrome or not.
#include<stdio.h>
include<conio.h>
void main()
{                                                           
char name[30];                                                    
char temp[30];
printf("enter string\n");
gets(name);
strcpy(temp,name);
if((strcmp(strrev(name),temp))==0)
{
  print("it is palindrome\n");
}
else
{
printf("it is not\n");
}
getch();
}