write program for palindrome
Answer Posted / deepa garia
#include<stdio.h>
#include<conio.h>
int main()
{
int r,n,k=0,l;
printf("\nENTER THE NUMBER ");
scanf("%d",&n);
l=n;
while(n>0)
{
r=n%10;
n=n/10;
k=k*10+r;
printf("%d",r);
}
if(k==l)
printf("\npalindrome");
else
printf("\n not palindrome");
getch();
return 0;
}
Is This Answer Correct ? | 16 Yes | 13 No |
Post New Answer View All Answers
What is meant by entry controlled loop? What all C++ loops are exit controlled?
How a new operator differs from the operator new?
How do I write a c++ program?
Name four predefined macros.
Are there interfaces in c++?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
Can we delete this pointer in c++?
What are the implicit member functions of class?
Explain the use of this pointer?
What are the comments in c++?
What is rvalue?
What is the output of the following program? Why?
What is an adaptor class or wrapper class in c++?
If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3