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 is the difference between #define debug 0 and #undef debug?
Is map sorted c++?
Define a constructor - what it is and how it might be called (2 methods)?
Explain the difference between abstract class and interface in c++?
Differentiate between the message and method in c++?
Are c and c++ different?
Is there a sort function in c++?
What is the use of namespace std in C++?
Explain the register storage classes in c++.
Can we specify variable field width in a scanf() format string? If possible how?
What type of question are asked in GE code writing test based on c++ data structures and pointers?
What is the difference between the compiler and the preprocessor?
What is virtual table?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
Write a program to add three numbers in C++ utilizing classes.