write program for palindrome
Answer Posted / amit
#include<iostream.h>
#include<conio.h>
main()
{
char c[8];
cout<<"enterd hte world of polindorom";
cin>>c;
int i=strlen(c);
i=i-1;
int flag=0;
for(int j=0;j<=1;j++)
{
if(c[j]==c[i])
{
flag=1;
}
else
{
int flag=0;
break;
}
}
i--;
if(flag==1)
{
cout<<"your option is polindorome";
}
else
{
cout<<"your option is not polindorome";
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the differences between malloc() and calloc()?
How do you find out if a linked-list has an end? (I.e. The list is not a cycle)
give me an example for testing a program showing the test path .show how the test is important and complex.
What is a syntax in c++?
In a function declaration, what does extern mean?
What are the types of array in c++?
What is an operator function? Describe the function of an operator function?
Are there interfaces in c++?
Define vptr.
How are the features of c++ different from c?
How is computer programming useful in real life?
Why we use #include iostream in c++?
What are punctuators in c++?
What is a v-table?
Mention the ways in which parameterized can be invoked. Give an example of each.