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
What is while loops?
Can we make any program in c++ without using any header file and what is the shortest program in c++.
What are the advantages of using const reference arguments in a function?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128
What is wrapper class in c++?
Is c++ a float?
What is the best way to take screenshots of a window with c++ in windows?
Write a program which employs Recursion
Show the declaration for a pointer to function returning long and taking an integer parameter.
What are vectors used for in c++?
What do you mean by inheritance in c++? Explain its types.
What are activex and ole?
What is polymorphism in c++? Explain with an example?
Write about a nested class and mention its use?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement