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 is volatile keyword in c?

1034


What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

4283


Did c have any year 2000 problems?

1107


What are the restrictions of a modulus operator?

1119


Explain how many levels deep can include files be nested?

1073


Why c is faster than c++?

1028


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

3064


What is #include cctype?

1117


What is the difference between array and pointer in c?

1158


How do shell structures work?

1110


What is multidimensional arrays

1120


How can I find out the size of a file, prior to reading it in?

1170


What is an auto variable in c?

1231


If the size of int data type is two bytes, what is the range of signed int data type?

1021


What are the types of data structures in c?

1149