write program for palindrome
Answer Posted / dharm
#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(m==s)
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 are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random
Explain explicit container.
How is data hiding achieved in c++?
What are the three forms of cin.get() and what are their differences?
How the endl and setw manipulator works?
What is the insertion operator and what does it do?
What is near, far and huge pointers? How many bytes are occupied by them?
What does I ++ mean in c++?
Why do we use string in c++?
Explain the difference between new() and malloc() in c++?
What are move semantics?
What is a float in c++?
What are c++ files?
What it is and how it might be called (2 methods).
What is the difference between set and map in c++?