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 a function to find whether a string is palindrome or
not and how many palindrome this string contain?

Answer Posted / nadeem

bool palindrome(char *str){
char *ptr1 = str;
char *ptr2 = str + strlen(str) - 1;

while(ptr1 < ptr2){
if(*ptr1++!= *ptr2--)
return false;// not palindrome

}

return true;//palindrome


}

Is This Answer Correct ?    3 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

2401


What is meant by gets in c?

1264


What is call by reference in functions?

1538


Explain goto?

1205


Explain the Difference between the New and Malloc keyword.

1187


How can I remove the trailing spaces from a string?

1119


how to make a scientific calculater ?

2128


What Is The Difference Between Null And Void Pointer?

1333


What are the benefits of organizational structure?

1064


What is the purpose of the preprocessor directive error?

1315


number of times a digit is present in a number

2079


What is a volatile keyword in c?

1212


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

1096


a program that can input number of records and can view it again the record

1959


What is unary operator?

1176