write program for palindrome
Answer Posted / dinakar
#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) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 242 Yes | 88 No |
Post New Answer View All Answers
What do you know about near, far and huge pointer?
What is std :: endl?
Will rust take over c++?
Write a program to interchange 2 variables without using the third one.
What is iterator c++?
Explain the operation of overloading of an assignment operator.
What does namespace mean in c++?
Mention the ways in which parameterized can be invoked.
What is the history of c++?
Can we declare a base-class destructor as virtual?
the first character in the variable name must be an a) special symbol b) number c) alphabet
Why can’t you call invariants() as the first line of your constructor?
Why do we use string in c++?
Explain linked list using c++ with an example?
What is a local reference?