write program for palindrome

Answer Posted / md.irfan(rourkela)

#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}

Is This Answer Correct ?    1204 Yes 747 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you differentiate between overloading the prefix and postfix increments?

603


What is near, far and huge pointers? How many bytes are occupied by them?

673


Can we distribute function templates and class templates in object libraries?

603


What is problem with overriding functions?

617


What is abstract class in c++?

600






What is the use of bit fields in structure declaration?

552


Differentiate between a copy constructor and an overloaded assignment operator.

651


Explain the scope of resolution operator.

639


Where must the declaration of a friend function appear?

547


How come you find out if a linked-list is a cycle or not?

583


Explain the isa and hasa class relationships. How would you implement each?

629


What do manipulators do?

588


What will happen if a pointer is deleted twice?

730


What is the C-style character string?

619


How do I write a c++ program?

610