write program for palindrome

Answer Posted / felix

#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 ?    182 Yes 97 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept of memory leak?

633


What is stream and its types in c++?

564


Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.

796


Is map ordered c++?

599


Why is c++ difficult?

618






What do you understand by pure virtual function? Write about its use?

586


How do you flush a buffer in c++?

610


What is dev c++ used for?

607


What is a storage class?

649


Can c++ do everything c can?

608


What is #include ctype h in c++?

669


How important is c++?

535


What is the difference between cin.read() and cin.getline()?

563


What is the best way to declare and define global variables?

707


What jobs can you get with a c++ certification?

594