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 is the difference between fread and fwrite function?

1130


What is the auto keyword good for?

1229


What do you mean by scope of a variable in c?

1055


How can a process change an environment variable in its caller?

1235


What are the features of the c language?

1138


Tell me can the size of an array be declared at runtime?

1083


my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?

1644


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

1192


What is volatile c?

1085


What are the properties of union in c?

1110


What is the purpose of 'register' keyword?

1131


Does c have class?

1179


What is the difference between strcpy() and memcpy() function in c programming?

1133


What are the benefits of c language?

1228


What is structure padding and packing in c?

1124