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

What is #ifdef ? What is its application?

1112


When should a type cast not be used?

1067


why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above

1157


What are logical errors and how does it differ from syntax errors?

1303


In a byte, what is the maximum decimal number that you can accommodate?

1142


What is the deal on sprintf_s return value?

1138


What is new line escape sequence?

1357


What does stand for?

1086


code for find determinent of amatrix

1971


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1161


In C, What is the #line used for?

2214


What is a scope resolution operator in c?

1277


What is data types?

1091


Explain bitwise shift operators?

1251


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

1505