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 is the name of your birth place?
Who wrote stl?
Explain when u will use Observer pattern and how u will implement in c++ .
What do stl stand for?
write a program to search and display the position of an element in a single-dimentional array using function.
write a c++ program to create an object of a class called employee containing the employee code name designation basic salarry HRA Da gross salary as data 10 such objects "members process "
why & sign is used in copy constructor
Name the different types of stl containers.
write a program to convert a decimal number in to its equivalent binary number?
what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?
what's the difference between function overloading and function overiding?
Find the error in the following program struct point {struct point *next; int data; } x; main() {int...data; } x; main() {int i; for(x=p;x!=0;) x=x->next,x++; freelist(x); } freelist(x) {free(x); return }