write program for palindrome

Answer Posted / anirban

#include<stdio.h>
#include<string.h>
#define size 26

void main()
{
char strsrc[size];
char strtmp[size];

clrscr();
printf("\n Enter String:= "); gets(strsrc);

strcpy(strtmp,strsrc);
strrev(strtmp);

if(strcmp(strsrc,strtmp)==0)
printf("\n Entered string \"%s\" ispalindrome",strsrc);
else
printf("\n Entered string \"%s\" is not
palindrome",strsrc);
getch();
}

Is This Answer Correct ?    12 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What parameter does the constructor to an ofstream object take?

826


What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?

901


What is type of 'this' pointer? Explain when it is get created?

778


Does c++ have a hash table?

730


Define pre-condition and post-condition to a member function in c++?

884


Explain selection sorting. Also write an example.

803


Explain terminate() function?

796


How would you obtain segment and offset addresses from a far address of a memory location?

824


What are the new features that iso/ansi c++ has added to original c++ specifications?

805


What is a catch statement?

781


What is meant by a delegate?

798


What information can an exception contain?

894


When you overload member functions, in what ways must they differ?

788


Can you please explain the difference between overloading and overriding?

813


What is code reusability in c++?

919