write program for palindrome
Answer Posted / surya
#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 ? | 14 Yes | 19 No |
Post New Answer View All Answers
What are the advantages of using typedef in a program?
What is a multiset c++?
What is the benefit of encapsulation?
What is namespace std; and what is consists of?
What are the different types of polymorphism in c++?
What is ios class in c++?
What is a virtual destructor? Explain the use of it?
What is the purpose of template?
What are the classes in c++?
What is a friend function in c++?
What will strcmp("Astring", "Astring"); return a) A positive value b) A negative value c) Zero
What is runtime polymorphism in c++?
What are separators in c++?
How would you use the functions memcpy(), memset(), memmove()?
What is a storage class? Mention the storage classes in c++.