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

How oops is better than procedural?

1108


Can you inherit a private class?

1109


What is static in oop?

1089


Which language is not a true object oriented programming language?

1148


what is the drawback of classical methods in oops?

3391


What is for loop and its syntax?

1095


What is the benefit of oop?

1066


How is class defined?

1154


why reinterpret cast is considered dangerous?

2406


Which method cannot be overridden?

1108


What is object in oop?

1124


How to call a non virtual function in the derived class by using base class pointer

6593


What is difference between multiple inheritance and multilevel inheritance?

1159


Can bst contain duplicates?

1206


just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.

6942