write program for palindrome
Answer Posted / saurav sadangi
#include<stdio.h>
int main(){
int n,s=0,r,m;
printf("Enter m:- ");
scanf("%d",&m);
n=m;
while(m>0){
r=m%10;
s=(s*10)+r;
m/=10;
}
printf("The reverse no is %d\n",s);
if (s==n)
printf("%d is pallendrom.\n",n);
else
printf("%d is not pallendrom.\n",n);
system("PAUSE");
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can you explicitly call a destructor on a local variable?
What is a literal in c++?
Explain overriding.
Explain how the virtual base class is different from the conventional base classes of the opps.
What sorting algorithm does c++ use?
Explain explicit container.
What would happen on forgetting [], while deallocating an array through new?
Is c++ fully object oriented?
If I is an integer variable, which is faster ++i or i++?
Where must the declaration of a friend function appear?
Differentiate between late binding and early binding. What are the advantages of early binding?
What is scope in c++ with example?
Differentiate between a template class and class template in c++?
Differentiate between structure and class in c++.
Is main a class in c++?