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 program for palindrome

Answer Posted / prakash

#include<stdio.h>
#include<conio.h>

main()
{

char s1[10],s2[10];
int m,i,j;
scanf("%s",s1);
strcpy(s2,s1);
m=strlen(s1);
for(i=0,j=m-1;i<=m-1,j<=0;i++,j--)
{
if(s1[i]!=s2[j])
printf("STRING IS NOT PALINDROME ");
}
printf("STRING IS a PALINDROME ");
getch();
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is vector string in c++?

1048


Why do we need templates?

954


How do you differentiate between overloading the prefix and postfix increments?

1048


Should I learn c or c++ or c#?

956


Write about an iterator class?

1036


What is function declaration in c++ with example?

1018


Explain the use of this pointer?

1123


What are the advantages of c++ over c?

1021


What is ofstream c++?

1034


What is an overflow error?

1063


what is oops and list its features in c++?

1003


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

996


How does c++ structure differ from c++ class?

1066


Why is standard template library used?

996


How do you establish an is-a relationship?

1090