write program for palindrome
Answer Posted / vijay kumar
#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,m,r;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
rev=rev*10+r;
n=n/10;
}
if(rev == m) // This is important step
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Define private, protected and public access control.
What is pointer -to-members in C++? Give their syntax?
Why we use #include iostream in c++?
How can I improve my c++ skills?
What is the difference between global variables and local variable
Are strings mutable in c++?
Is there any function that can skip certain number of characters present in the input stream?
Would you rather wait for quicksort, linear search, or bubble sort on a 200000 element array? (Or go to lunch...) a) Quicksort b) Linear Search c) Bubble Sort
How is computer programming useful in real life?
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
What is the purpose of the "delete" operator?
Write is a binary search tree? Write an algo and tell complexity?
How long will it take to learn programming?
What is object in c++ example?
How we can differentiate between a pre and post increment operators during overloading?