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
What is stream and its types in c++?
Is c++ an integer?
How are virtual functions implemented in c++?
what are function pointers?
What is scope operator in c++?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
Write a code/algo to find the frequency of each element in an array?
Can I learn c++ without knowing c?
Is it possible to provide default values while overloading a binary operator?
Where do I find the current c or c++ standard documents?
Define linked lists with the help of an example.
Define a pdb file.
How one would use switch in a program?
How do we implement inheritance in c++?
What is a pointer with example?