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

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,


what is the difference between <stdio.h>and "stdio.h"?

5 Answers  


what is the use of template classes in c++

1 Answers  


what is static?

4 Answers  


design class for linked list and include constructor,destructor,insert option. struct node { int node; struct node &ptr; }

1 Answers   HSBC,


what is the difference between class and structure in C++?

9 Answers   Aspire, IBS, TCS,


Which is better struts or spring?

0 Answers  


What is a class and object?

0 Answers  


what is virtual function in c++

6 Answers  


What is the difference between class and object?

4 Answers   Apple, Heinz,


Can you explain polymorphism?

0 Answers  


what is the difference between containership and inheritence?

1 Answers  


Categories