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
Do vectors start at 0 c++?
Which software is best for c++ programming?
What new()is different from malloc()?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
Which is best c++ or java?
What is the use of string in c++?
What are the benefits of pointers?
What is c++ best used for?
What is the advantage of c++ over c?
What are the advantages of inheritance in c++?
How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?
Explain what are mutator methods in c++?
How the delete operator differs from the delete[]operator?
What does floor mean in c++?
What is data types c++?