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 / nm

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

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

return true;

}

Is This Answer Correct ?    30 Yes 29 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the c keywords?

1207


What does the c in ctime mean?

1099


what is different between auto and local static? why should we use local static?

1128


What is #line in c?

1019


Where are some collections of useful code fragments and examples?

1164


Is c call by value?

1022


Write a program to check armstrong number in c?

1134


Explain is it better to bitshift a value than to multiply by 2?

1204


How do you search data in a data file using random access method?

1309


How can you determine the size of an allocated portion of memory?

1314


How do I get an accurate error status return from system on ms-dos?

1131


What is unsigned int in c?

1007


Why c language is called c?

1021


How can I remove the trailing spaces from a string?

1079


What is string length in c?

1107