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 is sizeof array?

1054


Is linux written in c?

1038


Why use int main instead of void main?

1117


What is #ifdef ? What is its application?

1103


Why can’t constant values be used to define an array’s initial size?

1373


What is pragma c?

1112


What is the use of static variable in c?

1089


Write a program to check armstrong number in c?

1128


When should a far pointer be used?

1119


What is difference between union and structure in c?

1157


using for loop sum 2 number of any 4 digit number in c language

2331


Whats s or c mean?

1023


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

1061


Explain how can I open a file so that other programs can update it at the same time?

1108


How pointer is different from array?

1074