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 quickly find the number of elements stored in a a) static array b) dynamic array ? Why is it difficult to store linked list in an array?how can you find the nodes with repetetive data in a linked list?
What is the use of lambda in c++?
What is null and void pointer?
What is a flag in c++?
Describe Trees using C++ with an example.
How do I use turbo c++?
Incase of a function declaration, what is extern means?
What are friend classes?
What is the use of string in c++?
What is prototype for that c string function?
Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be
What are smart pointers?
What do you mean by stack unwinding in c++?
What is the use of bit fields in structure declaration?
How to declaring variables in c++?