write program for palindrome
Answer Posted / baskaran
#include<stdio.h>
#include<string.h>
#define size 26
void main()
{
char strsrc[size];
char strtmp[size];
printf("\n Enter String:= ");
gets(strsrc);
strcpy(strtmp,strsrc);
strrev(strtmp);
if(strcmp(strsrc,strtmp)==0)
printf("\n Entered string \"%s\" is palindrome\n",strsrc);
else
printf("\n Entered string \"%s\" is not
Palindrome\n",strsrc);
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How do you establish an is-a relationship?
What is an incomplete type in c++?
How many ways can a variable be initialized into in C++?
Explain the difference between c++ and java.
What are put and get pointers?
Can we use struct in c++?
How do pointers work?
How do you declare A pointer to a function which receives nothing and returns nothing
What is a forward referencing and when should it be used?
What is the equivalent of Pascal's Real a) unsigned int b) float c) char
What is the difference between while and do while loop? Explain with examples.
What is a binary file? List the merits and demerits of the binary file usagein C++.
What are enumerations?
an integer constant must have atleast one a) character b) digit c) decimal point
What do c++ programmers do?