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
When you overload member functions, in what ways must they differ?
Can you please explain the difference between static and dynamic binding of functions?
Explain the difference between overloading and overriding?
Mention the purpose of istream class?
Write is a binary search tree? Write an algo and tell complexity?
Which compiler does turbo c++ use?
declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator
Can non-public members of another instance of the class be retrieved by the method of the same class?
What are built-in functions? What is the syntax for the definition?
When must you use a pointer rather than a reference?
How do you establish a has-a relationship?
What is fflush c++?
What is microsoft c++ redistributable?
What is the use of endl?
What is the use of pointer in c++ with example?