write program for palindrome

Answer Posted / ramya

#include<stdio.h>
#include<conio.h>
void main()
{
string s1,s2;
printf("Enter the string:");
scanf("%s",s1);
s2=strrev(s1);
if(s1==s2)
{
printf("the given string is palindrome");
}
else
printf("the given string is not palindrome");
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is capacity in vector in c++?

555


In c++, what is the difference between method overloading and method overriding?

609


What does n mean in c++?

644


Explain about Virtual Function in C++?

622


How can a struct in c++ differs from a struct in c?

619






Do you know what are pure virtual functions?

646


What is a string example?

566


What happens when the extern "c" char func (char*,waste) executes?

648


What is a constructor and how is it called?

608


What is the use of endl in c++?

605


Do we have to use initialization list in spite of the assignment in constructors?

573


How do you flush std cout?

585


Write some differences between an external iterator and an internal iterator?

599


What are arrays c++?

621


Comment on local and global scope of a variable.

592