Answers

2014-04-29T21:11:01+05:30
Void main()
{
char str[]="malaxyalam";
int i,l,j;
for(l=0;str[l]!='\0';l++);
i=0;
j=l-1;
while(i<j)
{
if(str[i]!=str[j])
break;
i++;j--;
}
if(i<j)
printf("No");
else
printf("Yes");
}
0
2014-05-02T15:52:32+05:30
#include<stdio.h>
#include<string.h>
void main()
{
char a[100],b[100];
printf("\nEnter the String to check whether it is prime number or not:");
gets(a);
strcpy(b,a);
strrev(b);
if(strcmp(a,b)==0)
printf("%s is a palindrome" ,a);
else 
printf("%s is not a prime number",a);
}

0