write program for palindrome

Answer Posted / md. arif shahmim

#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 ?    16 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is VOID?

818


Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort

822


Does a derived class inherit or doesn't inherit?

821


How to implement is-a and has-a class relationships?

767


What is endianness?

842


What is the use of 'using' declaration in c++?

835


What do the keywords volatile and mean mutable?

792


What does n mean in c++?

830


What is else if syntax?

873


What do you mean by function and operator overloading in c++?

797


What is the latest c++ version?

811


What is c++ code?

806


How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?

820


What are associate containers?

802


what you know about c++?

848