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 / darren chang

bool palind(string input)
{
int j=input.length()-1;
int i=0;
while(i<j)
{
if(input[i]!=input[j])
return false;
i++;
j--;
}
return true;
}

Is This Answer Correct ?    23 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between an external iterator and an internal iterator?

1060


what is VOID?

1019


What is the two main roles of operating system?

982


What is a syntax in c++?

1121


What can c++ be used for?

1046


What is diamond problem in c++?

958


How do you invoke a base member function from a derived class in which you have not overridden that function?

1077


What is #include iomanip?

961


Can a new be used in place of old mallocq? If yes, why?

1043


What is data hiding c++?

1006


Which of the following is evaluated first: a) && b) || c) !

2318


What is c++ hash?

1065


Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list

961


How do you instruct your compiler to print the contents of the intermediate file showing the effects of the preprocessor?

1091


What is the error in the code below and how should it be corrected?

715