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


Please Help Members By Posting Answers For Below Questions

What is meant by entry controlled loop? What all C++ loops are exit controlled?

558


How a new operator differs from the operator new?

616


How do I write a c++ program?

590


Name four predefined macros.

592


Are there interfaces in c++?

551






Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?

695


. 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?

2750


Can we delete this pointer in c++?

676


What are the implicit member functions of class?

593


Explain the use of this pointer?

630


What are the comments in c++?

566


What is rvalue?

673


What is the output of the following program? Why?

618


What is an adaptor class or wrapper class in c++?

600


If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3

827