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
Define token in c++.
What is endl c++?
What is object file? How can you access object file?
How do pointers work?
Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;
What is a c++ map?
What is virtual destructor? What is its use?
Why is polymorphism useful?
I want to write a C++ language program that: 1. Reads in the size of a square from the screen; 2. Prints a hollow square of that size out of “-“, “|” and blanks on screen; 3. Prints the same hollow square onto a text file. The program should work for squares of all side sizes between 1 and 20.
What is a constant? Explain with an example.
Can we use this pointer in a class specific, operator-overloading function for new operator?
What are the c++ access specifiers?
When does the c++ compiler create temporary variables?
Explain the concept of dynamic allocation of memory?
What are proxy objects in c++?