write program for palindrome
Answer Posted / tarun soni
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(s==m)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the basic structure of a c++ program?
What is a terminating character in c++?
What are dynamic type checking?
We use library functions in the program, in what form they are provided to the program?
What is searching?
What is buffer and example?
Do we have to use initialization list in spite of the assignment in constructors?
What relational operators if statements in c++?
Is it possible to get the source code back from binary file?
When to use “const” reference arguments in a function?
Explain object slicing in c++?
What are pointer-to-members? Explain.
What are the advantage of using register variables?
What are the various operations performed on stack?
What does n mean in c++?