write program for palindrome
Answer Posted / prakash
#include<stdio.h>
#include<conio.h>
main()
{
char s1[10],s2[10];
int m,i,j;
scanf("%s",s1);
strcpy(s2,s1);
m=strlen(s1);
for(i=0,j=m-1;i<=m-1,j<=0;i++,j--)
{
if(s1[i]!=s2[j])
printf("STRING IS NOT PALINDROME ");
}
printf("STRING IS a PALINDROME ");
getch();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Explain polymorphism?
What is abstraction with real time example?
Why are pointers used?
What is the main purpose of overloading operators?
What does scope resolution operator do?
What is the difference between a reference and a pointer?
What are keywords in c++?
Can create new c++ operators?
Difference between a copy constructor and an assignment operator.
Why cstdlib is used in c++?
Which is best ide for c++?
What is the difference between the functions memmove() and memcpy()?
If dog is a friend of boy and boy is a friend of house, is dog a friend of house?
Define namespace in c++?
What is == in programming?