write program for palindrome
Answer Posted / akash
#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,r;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
rev=rev*10+r;
n=n/10;
}
printf("reverse of the number is %d",rev);
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the two main components of c++?
Explain class invariant.
What are the advantages of using a pointer?
Difference between delete and free.
What is ostream in c++?
What do c++ programmers do?
What are libraries in c++?
What is a volatile variable in c++?
What is virtual destructor? What is its use?
Explain how to initialize a const member data.
Discuss the possibilities related to the termination of a program before entering the mainq method?
In the derived class, which data member of the base class are visible?
What is endianness?
What is an operator function? Describe the function of an operator function?
Can you explicitly call a destructor on a local variable?