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

Hai what is the different types of versions and their differences

1897


What is malloc() function?

1097


What is meant by 'bit masking'?

1334


Is a house a mass structure?

1052


Here is a good puzzle: how do you write a program which produces its own source code as output?

1036


There seem to be a few missing operators ..

1004


What is ctrl c called?

1002


What is the maximum no. of arguments that can be given in a command line in C.?

1087


code for replace tabs with equivalent number of blanks

2100


What is the difference between printf and scanf )?

1023


What is the function of volatile in c language?

1070


Explain what are the different file extensions involved when programming in c?

1052


What is hungarian notation? Is it worthwhile?

1167


What is structure padding in c?

1058


Explain what is wrong with this program statement?

1069