Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the history of c++?

1084


What are activex and ole?

1067


What are the types of container classes?

1166


How do you save a c++ program?

1049


What is encapsulation in c++?

1307


Can we make copy constructor private in c++?

1065


What is object in c++ example?

1124


What is object oriented programming (oop)?

1124


What is the main function c++?

1132


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?

1090


What is c++ array?

1130


Write is a binary search tree? Write an algo and tell complexity?

1029


You run a shell on unix system. How would you tell which shell are you running?

1178


State two differences between C and C++.

1182


Describe new operator and delete operator?

1094