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.



Write a program to find out the number of palindromes in a sentence...

Answer / 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

More OOPS Interview Questions

write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation

1 Answers   College School Exams Tests, HCL, IBM, TCS,


Is following functions are said to be overloaded? int add(int a,int b) char *add(int a,int b)

4 Answers  


what is single inheritance?

18 Answers   IBM,


what is data abstraction with example.

1 Answers  


why overriding?

3 Answers  


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

0 Answers   HCL,


How can i write a code in c# to take a number from the user and then find all the prime numbers till the number entered by the user.

4 Answers   NIIT, TCS,


Plese get me a perfect C++ program for railway/airway reservation with all details.

0 Answers   ITM,


How to hide the base class functionality in Inheritance?

0 Answers   Viscus Infotech,


What is class and example?

0 Answers  


What is the difference between declaration and definition?

20 Answers   IBS,


pointers are support in C#? if yes then how to use it?

8 Answers   Softvision Solution,


Categories