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?
what is template and type convertion
Define the terms: field, record, table and database
In what cases using of a 'template' is a better approach then using of a 'base class'?
6 Answers Lucent, Mind Tree, Wipro,
What is a standard template library (stl)?
In what scenario does the Logical file and Physical file being used?
what is use of for loop?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
how to get the sum of two integers?
Give the output of the following program main() {int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris");
what is the difference between thread and process
What are stl algorithms?