answersLogoWhite

0

Wap to display palindrome no in c?

User Avatar

Anonymous

15y ago
Updated: 8/18/2019

#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();

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Wap in c plus plus to find out the string is palindrome or not in?

use the strrev() function on the given string and compare with original string.If both are equal they are palindromes else not.


How do you write a palindrome program in c in Wikipedia?

You don't have to write palindrome programs in wikipedia.


What is palindrome in c?

char* = "racecar"


What is the palindrome in c language?

Nothing.


Wap to display the Fibonacci series?

#include&lt;stdio.h&gt; main() { int a=0,b=1,n,c,i; printf("enter number"); scanf("%d",&amp;n); printf("%d\n",a); for(i=1;i&lt;=n;i++) { c=a+b; printf("%d\n",c); b=a; a=c; } getch(); }


Is a cow a palindrome?

The word 'cow' is not a palindrome because it is not spelled the same backward and forward (c-o-w, w-o-c).


Protocol that specifies how some mobile devices can display internet content?

WAP (Wireless Application Protocol)


Select the odd one out a wap b http c baan d arp?

ans: c wap,http,arp are internet protocos, whereas baan vendor erp software


Wap to copy one file to another in C programming?

#include&lt;stdio&gt;


In a palindrome how to display the number of words or sentences entered?

To display the number of words or sentences in a palindrome, first, you need to check if the input string reads the same forwards and backwards. Then, you can split the string into words using a space or punctuation as a delimiter. Finally, count the number of words (or sentences, if counting full sentences) and present that count alongside the palindrome verification.


Program that generates and displays the Fibonacci?

/*WAP to display Fibonacci series*/ #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int i,a=0,b=1,c; scanf("%d",&amp;n); printf("%d\n%d",a,b); for(i=0;i&lt;n;i++) { c=a+b; a=b; b=c; printf("\n%d",c); } getch(); }


Stack c language program of palindrome?

what ever you assume