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 is the best c++ compiler?
Please explain class & object in c++?
Do you know about latest advancements in C++ ?
What is virtual base class?
What are manipulators used for?
Why do we use templates?
What is abstraction in c++ with example?
What is a base class?
What is the iunknown interface?
What are the rules about using an underscore in a c++ identifier?
Can I uninstall microsoft c++ redistributable?
Differentiate between late binding and early binding. What are the advantages of early binding?
If a function doesn’t return a value, how do you declare the function?
List the issue that the auto_ptr object handles?
What is malloc in c++?