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

How arrays can be passed to a user defined function

966


What are types of preprocessor in c?

1014


How is a macro different from a function?

1117


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1913


Differentiate fundamental data types and derived data types in C.

983


Tell us bitwise shift operators?

1022


How can I generate floating-point random numbers?

1041


Difference between goto, long jmp() and setjmp()?

1124


What is pointers in c?

1067


What is an identifier?

979


write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);

2295


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

1076


What do you mean by a sequential access file?

1041


What is the difference between exit() and _exit() function?

992


What are the valid places to have keyword “break”?

1039