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

How do you define a class in c++?

0 Answers  


Comment on assignment operator in c++.

0 Answers  


What are the three forms of cin.get() and what are their differences?

0 Answers  


Does c++ support multilevel and multiple inheritances?

0 Answers  


When to use “const” reference arguments in a function?

0 Answers  






How many different levels of pointers are there?

0 Answers   Genpact,


Do you need a main function in c++?

0 Answers  


What is a stack? How it can be implemented?

0 Answers  


Disadvantages of c++

8 Answers   HCL,


WHAT IS THE ABREVATION OF FORTRAN?

4 Answers  


how to swap two strings without using any third variable ?

11 Answers  


What are libraries in c++?

0 Answers  


Categories