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
Why is the function main() special?
Can c++ be faster than c?
What is a dynamic binding in c++?
What is the most useful programming language?
If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?
What's c++ used for?
Explain terminate() and unexpected() function?
What is the iunknown interface?
What does namespace mean in c++?
Explain the auto storage classes in c++.
How many keywords are used in c++?
What is polymorphism and its type in c++?
What is std :: flush?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
What is virtual base class uses?