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
What do you mean by function overriding & function overloading in c++?
Explain what is class definition in c++ ?
Explain the purpose of the keyword volatile.
What is singleton class in c++?
Why do we need c++?
What does flush do?
If I is an integer variable, which is faster ++i or i++?
Is it possible for the objects to read and write themselves?
Write about the local class and mention its use?
What is searching?
What is a Default constructor?
How do I use turbo c++?
What are the various storage classes in C++?
Explain object slicing in c++?
What is a class template?