write program for palindrome
Answer Posted / krishna reddy
#include<stdio.h>
#include<conio.h>
void main()
{
int n,m,s,reverse=0;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n!=0)
{
s=n%10;
reverse=reverse*10+s;
n=n/10;
}
if(m==reverse)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Why do we use using namespace std in c++?
Can a program run without main function?
What is a modifier in c++?
What is virtual base class uses?
In a function declaration what does extern means?
Define the process of handling in case of destructor failure?
Do you know about C++ 11 standard?
How can you link a c program with a c function?
What is the keyword auto for?
What is the difference between the parameter to a template and the parameter to a function?
How many types of modularization are there in c++?
What operator is used to access a struct through a pointer a) >> b) -> c) *
What does std mean in c++?
Differentiate between an array and a list?
Explain the properties and principles of oop.