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

If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

0 Answers  


Write an algorithm that determines whether or not an almost complete binary tree is a heap.

0 Answers   TCS,


Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?

0 Answers  


What is the hardest coding language to learn?

0 Answers  


What is c++ similar to?

0 Answers  






What are the various operations performed on stack?

0 Answers  


Badboy is defined who has ALL the following properties: 1. Does not have a girlfriend and is not married. 2. He is not more than 23 years old. 3. The middle name should be "Singh" 4. The last name should have more than 4 characters. 5. The character 'a' should appear in the last name at least two times. 6. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1 Answers  


Is std :: string immutable?

0 Answers  


What is implicit conversion/coercion in c++?

1 Answers  


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

0 Answers  


Why c++ is created?

0 Answers  


What is class in c++ with example?

0 Answers  


Categories