write a program that input four digit no and finds it is
palindrome or not
Answers were Sorted based on User's Feedback
#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,rem, temp,i;
printf(" Enter the 4 digit number :\n");
scanf("%d", &n);
temp = n;
for(i=1;i<=4;i++)
{
rem = n % 10;
n = n/10;
rev = rev * 10 + rem;
}
if(temp == rev)
printf(" Its a palindrome:\n");
else
printf(" Not a palindrome:\n");
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
What two types of containers does the stl provide?
In what cases using of a 'template' is a better approach then using of a 'base class'?
6 Answers Lucent, Mind Tree, Wipro,
what's the difference between function overloading and function overiding?
Is stl open source?
what is an algorithm in terms of STL?
Is stl part of c++ standard?
What is stl language?
Why should a c++ programmer be interested in stl?
What are the components of stl?
Which data structure gives efficient search? A. B-tree B. binary tree C. array D. linked list
21 Answers ABC, Sun Microsystems,
What does stl mean in slang?
What is Template Specialization?