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

Why can’t you call invariants() as the first line of your constructor?

803


What is the difference between new() and malloc()?

1298


Write a program which employs Recursion

1024


What are activex and ole?

808


What are literals in C++?

813


Is vector a class in c++?

838


How did c++ get its name?

805


Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?

875


Explain what is oop?

856


Explain explicit container.

876


What flag means?

749


When are exception objects created?

832


Explain the difference between class and struct in c++?

843


Do you know about latest advancements in C++ ?

894


What is the header file for setw?

848