write program for palindrome
Answer Posted / sowmya
#include,studio.h>
#include<conio.h>
void main()
{
int num,mod,rev=0;
clrscr();
printf("Enter any no:");
scanf("%d",&n);
while(n>=0)
{
mod=n%10;
rev=rev*10+mod;
n=n/10;
}
if(rev=n)
{
printf("palindrome");
}
else
{
printf("not palindrome");
}
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain what you mean by a pointer.
How is objective c different from c++?
What is the use of this pointer in c++?
Which software is used for c++ programming?
Explain how to initialize a const data member.
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
What is using namespace std in c++?
Do you know the use of vtable?
Out of fgets() and gets() which function is safe to use and why?
What do you mean by static variables?
Which function should be used to free the memory allocated by calloc()?
Which is best c++ or java?
What is diamond problem in c++?
Is vector a class in c++?
What is == in programming?