write program for palindrome

Answer Posted / bala murali

#include<stdio.h>
#include<conio.h>
main()
{
char s1,s2;
printf("enter a string:");
gets(s1);
strcpy(s2,s1);
strrev(s2);
if(strcmp(s1,s2))
printf("palindrome:");
else
printf("not a palindrome:");
getch();
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between n and endl in c++?

762


What is c++ vb?

828


int age=35; if(age>80) {Console.WriteLine("Boy you are old");} else {Console.WrieLine("That is a good age");}

1018


Define a conversion constructor?

804


Why do we use string in c++?

700


What are the rules about using an underscore in a c++ identifier?

824


What is a static member?

785


What is a buffer c++?

770


Why can templates only be implemented in the header file?

861


What are the extraction and insertion operators in c++?

754


Write about the members that a derived class can add?

757


Which one between if-else and switch is more efficient?

808


Why do we need templates?

736


Why is c++ still used?

787


What are the 3 levels of programming languages?

768