write program for palindrome
Answer Posted / apoorv
#include<stdio.h>
#include<conio.h>
int main()
{
long int n,s=0,m,r;
printf("enter any no");
scanf("%ld",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==s)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
When is the copy constructor called?
What is #include iostream in c++?
Is map thread safe c++?
Write about the members that a derived class can add?
What is the difference between public and private data members?
What is meant by iomanip in c++?
What is private, public and protected inheritance?
What is string in c++ programming?
Is turbo c++ free?
Explain what data encapsulation is in c++?
What are the uses of typedef in a program?
What are namespaces in c++?
what is the difference between overloading & overriding? give example.
Write about the local class and mention its use?
What is constructor c++?