write program for palindrome

Answers were Sorted based on User's Feedback



write program for palindrome..

Answer / felix

#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 ?    242 Yes 354 No

Post New Answer

More C++ General Interview Questions

Please explain the reference variable in c++?

0 Answers  


What is the use of dot in c++?

0 Answers  


Does std endl flush?

0 Answers  


What are the different data types present in C++?

4 Answers  


What are the advantages of using a pointer?

0 Answers  


What are the popular tools used to detect memory leaks in c++

4 Answers   TATA,


Why namespace is used in c++?

0 Answers  


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

0 Answers  


When volatile can be used?

3 Answers   Symphony,


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

0 Answers  


What are the types of container classes?

0 Answers  


Explain mutable storage class specifier.

0 Answers  


Categories