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 is the difference between structures and unions?
Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?
What is the use of "new" operator?
When is the destructor called?
What is the C-style character string?
When we use Abstract Class and when we use Interface?where we will implement in real time?
Explain the register storage classes in c++.
Write a function to find the nth item from the end of a linked list in a single pass.
What is a flag in c++?
What is the full form of c++?
Define whitespace in C++.
What are references in c++? What is a local reference?
Explain how the virtual base class is different from the conventional base classes of the opps.
What is atoi?
Does improper inheritance have a potential to wreck a project?