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...

How to check whether string is a palindrome, WITHOUT USING
STRING FUNCTIONS?

Answer Posted / ramu gurram

#include<stdio.h>
void main()
{
char str[10]="liril";
int i,l,count=1;
printf("first find the string length as follow\n");
printf("\n\n");
for(l=0;str[l]!='\0';l++)
{
}
printf("length of the string %s is %d\n",str,l);
printf("\n\n");
for(i=0,l=l-1;l>=0;l--,i++)
{
if(str[i]!=str[l])
{
count++;
break;
}
}
if(count==1)
printf("given string is palindrom");
else
printf("given string is not palindrom");
}

Is This Answer Correct ?    20 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of c preprocessor?

1208


What are the advantages of using Unions?

1066


How can I sort a linked list?

968


When is the “void” keyword used in a function?

1428


What is the value of h?

985


what are bit fields? What is the use of bit fields in a structure declaration?

2041


How can I remove the trailing spaces from a string?

1024


What are data structures in c and how to use them?

1093


What is #define in c?

990


How many types of sorting are there in c?

1010


What is the use of define in c?

998


What is putchar() function?

1074


Can we add pointers together?

999


What does s c mean in text?

1053


How would you rename a function in C?

993