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

how do u initialize the constant variables

5 Answers   IBM, Siemens,


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

9 Answers   Aspire, IBS, TCS,


Input: enter the value:1234 output: 1 2 3 4 write a program to get above output.....

4 Answers   Bally Technologies, IBM, SoftSol,


What is overriding in oops?

0 Answers  


Name an advantage of array over linked list?

24 Answers   GML, IBM, Software Solutions,


write a program to find the largest of two numbers without using for,while,switch,if else, conditional operator and do while using c++ pgmng language

3 Answers   Satyam,


Can you inherit a private class?

0 Answers  


1.explicit call for destructor 2.calling function inside a constructor. 3.base *b-new derived delete b; 4.delete p what it will delete. 5.size of base class and derived class int i,in base class and int j in derived. 6.int i-20 int main() { int i =5; printf("%d".::i); { int i =10; printf("%d".::i); } } 7.object slicing 8.new 9.function overloading(return type). 10.class base() { virtuval fun() { ----- } } class derivied:public base() { fun() { ----- } } int main() { derived d; } 11.how static function will call in C++? 12.default structures are in C++? 13.constructors should be in public . 14.virtuval constructor not exist. 15.multilevel inhritence. destructor order.

1 Answers   Tech Mahindra,


IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?

2 Answers  


Iam doing my project on instant messaging , if you any new ideas regarding this project ,please suggest it?

2 Answers  


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

0 Answers   TCS,


Can bst contain duplicates?

0 Answers  


Categories