write program for palindrome

Answer Posted / m.sathish krishna

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

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program to show polymorphism in C++?

826


Explain Memory Allocation in C/C++ ?

817


Is vector a class in c++?

784


What is a breakpoint?

766


What are single and multiple inheritances in c++?

774


What is the use of this pointer in c++?

777


Which function should be used to free the memory allocated by calloc()?

773


What does flush do?

754


Declare a class vehicle and make it an abstract data type.

723


How a new element can be added or pushed in a stack?

780


What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

927


Explain bubble sorting.

810


What is heap sort in c++?

841


Explain the difference between new() and malloc() in c++?

835


What are enumerations?

847