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 virtual base class?
What is one dimensional array in c++?
What is scope resolution operator in c++ with example?
What is the difference between while and do while loop?
What does ctime() do?
How are pointers type-cast?
What are the rules for naming an identifier?
Do you know the use of vtable?
Define copy constructor.
How is c++ used in the real world?
Define a nested class.
Name the debugging methods that are used to solve problems?
What are structs in c++?
Incase of a function declaration, what is extern means?
What is ctime c++?