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 / coolcom(chandan)

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--)
{
palin=0;
if(s[a]==s[len])
palin=1;

else
{
printf("string %s is not palindrome",s);
getch();
exit();
}
}
printf("string %s is palindrome",s);
getch();

}

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are identifiers and keywords in c?

1109


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2334


What is c programming structure?

1212


What is the purpose of scanf() and printf() functions?

1246


What will be your course of action for a push operation?

1116


Write a program to show the change in position of a cursor using c

1076


Describe the steps to insert data into a singly linked list.

1080


Write a code to remove duplicates in a string.

1049


Do pointers take up memory?

1166


How can I ensure that integer arithmetic doesnt overflow?

1179


What is #include called?

1066


What are the types of type specifiers?

1049


Differentiate between the = symbol and == symbol?

1306


disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit

2076


Write a simple code fragment that will check if a number is positive or negative.

1165