write program for palindrome
Answer Posted / badsha
#include<iostream.h>
void main()
{
int m=0,n,s=0,r;
cout<<"Enter any number :"<<endl;
cin>>n;
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==s)
{
cout<<"it is palindrom :"<<endl;
}
else
{
cout<<"No is Not palindrom :"<<endl;
}
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
How can you quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
What is the type of 'this' pointer? When does it get created?
Name the operators that cannot be overloaded in C++?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
Can we inherit constructor in c++?
Write about the use of the virtual destructor?
What is the difference between a template and a macro?
What is struct c++?
How do you sort a sort function in c++ to sort in descending order?
What is difference between rand () and srand ()?
Can you pass an array to a function in c++?
Why do we use iterators?
Explain the difference between class and struct in c++?
What will the line of code below print out and why?