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 a program to find out the number of palindromes in a
sentence.

Answer Posted / ravi

void main()
{

long int n;
printf("ENTER A NUMBER: ");
scanf("%ld",&n);
long int n1,mod;

n1=n;

long int rev=0;

while(n>0)
{
mod = n%10;
rev = rev * 10 + mod;
n = n / 10;

}

if (n1 == rev)
printf("%ld is a palindrome\n",n1);

else
printf("%ld is not a palindrome\n",n1);



}

Is This Answer Correct ?    7 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Whats oop mean?

1006


What is the main feature of oop?

1124


Which is better struts or spring?

1013


Can private class be inherited?

1135


Is html an oop?

1025


How does polymorphism work?

1094


Why is there no multiple inheritance?

970


What is interface in oop?

1090


What are the benefits of interface?

1009


can inline function declare in private part of class?

4338


Can a destructor be called directly?

1036


Why it is called runtime polymorphism?

1080


Get me an image implementation program.

1951


Can an interface inherit a class?

1030


Why is static class not inherited?

1066