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

Find string palindrome 10marks

Answer Posted / babitha

void main()
{
int a,len,palin;
char s[20];

scanf("%s",s);

len=strlen(s);
printf("%d \n",len);

for(a=0,len=len-1;a<len;a++,len--)
{
if(s[a]==s[len])
palin=1;

else
break;
}

if(palin==1)
printf("string %s is palindrome",s);
else
printf("string %s is not palindrome",s);

getch();

}

Is This Answer Correct ?    18 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we declare a function inside a function in c?

1096


What are the differences between new and malloc in C?

1206


What does s c mean in text?

1149


What is static memory allocation?

1248


Why can arithmetic operations not be performed on void pointers?

1097


What is the difference between Printf(..) and sprint(...) ?

1638


Explain what is a static function?

1158


What are the different types of endless loops?

1128


What are local variables c?

1071


What would be an example of a structure analogous to structure c?

1048


write a program to rearrange the array such way that all even elements should come first and next come odd

2354


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

1076


Is there any demerits of using pointer?

1117


Which function in C can be used to append a string to another string?

1274


What is build process in c?

1206