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
Why we use #include iostream in c++?
Can a program run without main in c++?
Is c++ map a hash table?
Explain function overloading
write a programme to get a character and thier ASCII value
why is iostream::eof inside a loop condition considered wrong?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
an operation between an integer and real always yeilds a) integer result b) real result c) float result
State the difference between pre and post increment/decrement operations.
How do you master coding?
What is flush () in c++?
List the merits and demerits of declaring a nested class in C++?
Define a nested class. Explain how it can be useful.
What are the characteristics of friend functions?
Which compiler does turbo c++ use?