write program for palindrome
Answer Posted / sat
#include<stdio.h>
#include<string.h>
void main()
{
char a[40],b[40];
printf("\n Enter String:= ");
gets(a);
strcpy(b,a);
strrev(b);
if(strcmp(b,a)==0)
printf("\n Entered string \"%s\" ispalindrome",b);
else
printf("\n Entered string \"%s\" is not palindrome",a);
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is this weird colon-member (" : ") syntax in the constructor?
What are the advantages of using const reference arguments in a function?
What do you mean by delegate? Can a user retain delegates?
What is the use of class in c++?
Why do we use setw in c++?
Is linux written in c or c++?
Do you know what are pure virtual functions?
What is a terminating character in c++?
Which operations are permitted on pointers?
how to explain our contribution in the project?
What is lazy initialization in c++?
What is the difference between *p++ and (*p)++ ?
What is meant by entry controlled loop?
How does class accomplish data hiding in c++?
What does std :: flush do?