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 history of c++?
What are activex and ole?
What are the types of container classes?
How do you save a c++ program?
What is encapsulation in c++?
Can we make copy constructor private in c++?
What is object in c++ example?
What is object oriented programming (oop)?
What is the main function c++?
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
What is c++ array?
Write is a binary search tree? Write an algo and tell complexity?
You run a shell on unix system. How would you tell which shell are you running?
State two differences between C and C++.
Describe new operator and delete operator?