wap that reads string from the keyboard and determine whether string is a palindrome or not.




#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{
char string[50],reverse[50];
int i;
printf("enter the string\t");
gets(string);
strcpy(reverse,string);
strrev(reverse);
i=stricmp(reverse,string);
if(i==0)
printf("the string entered is a palindrome");
else
printf("the enterted string is not a palindrome.");
getch();
}

No comments:

Post a Comment

Implemet Stack in python

  class Stack : def __init__ ( self , data ): self . stack = [] if ( data ): self . stack . append ( da...