#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
char str[20],revstr[20];
int i,j=0,l,n;
printf("enter a string");
scanf("%s",str);
l=strlen(str);
n=l-1;
for(i=n;i>=0;i--)
{
revstr[j]=str[i];
j++;
}
revstr[j]='\0';
if((strcmp(str,revstr))==0)
printf("palindrome");
else
printf("not a palindrome");
getch();
}
use the strrev() function on the given string and compare with original string.If both are equal they are palindromes else not.
char* = "racecar"
Nothing.
You don't have to write palindrome programs in wikipedia.
#include<stdio.h> main() { int a=0,b=1,n,c,i; printf("enter number"); scanf("%d",&n); printf("%d\n",a); for(i=1;i<=n;i++) { c=a+b; printf("%d\n",c); b=a; a=c; } getch(); }
The word 'cow' is not a palindrome because it is not spelled the same backward and forward (c-o-w, w-o-c).
WAP (Wireless Application Protocol)
ans: c wap,http,arp are internet protocos, whereas baan vendor erp software
#include<stdio>
what ever you assume
/*WAP to display Fibonacci series*/ #include<stdio.h> #include<conio.h> void main() { int i,a=0,b=1,c; scanf("%d",&n); printf("%d\n%d",a,b); for(i=0;i<n;i++) { c=a+b; a=b; b=c; printf("\n%d",c); } getch(); }
baan .... baan is a software rest are not ....