write program for palindrome
Answer Posted / dinakar
#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(s == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
Is This Answer Correct ? | 242 Yes | 88 No |
Post New Answer View All Answers
How can you tell what shell you are running on unix system?
What does the nocreate and noreplace flag ensure when they are used for opening a file?
Explain object slicing in c++?
What is a namespace in c++?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
What is a far pointer? where we use it?
Explain linear search.
What are the methods of exporting a function from a dll?
What is the average salary of a c++ programmer?
Explain virtual class?
Do the parentheses after the type name make a difference with new?
Write a recursive program to calculate factorial in c++.
In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h
How to declare an array of pointers to integer?
Which operations are permitted on pointers?