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 const volatile variable in c?

1105


Array is an lvalue or not?

1192


How will you delete a node in DLL?

1339


What is switch in c?

1162


What is the difference between formatted&unformatted i/o functions?

1111


Explain what is the difference between null and nul?

1215


if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0

2015


What is wrong with this program statement? void = 10;

1316


Why pointers are used?

1117


What is difference between union and structure in c?

1248


How we can insert comments in a c program?

1190


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

2008


Write a program to print all permutations of a given string.

1236


Why shouldn’t I start variable names with underscores?

1119


Explain about block scope in c?

1149