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
How long it will take to learn c++?
Explain binary search.
What is the average salary of a c++ programmer?
How do I download c++?
What is the difference between interpreters and compilers?
What is type of 'this' pointer?
Can a constructor be private?
Explain how the virtual base class is different from the conventional base classes of the opps.
What is lambda in c++?
what is multi-threading in C++?
What is function overriding in c++?
What is the use of main function in c++?
Give an example of run-time polymorphism/virtual functions.
When should overload new operator on a global basis or a class basis?
What is else syntax in c++?