write program for palindrome
Answer Posted / anonymous
#include<stdio.h>
#include<conio.h>
int main()
{
int n,s=0,m,r;
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
if(m==s)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the rules about using an underscore in a c++ identifier?
Differentiate between a constructor and a destructor in c++.
What does return 0 do in c++?
What's c++ used for?
Explain this pointer?
What are the types of container classes?
How do you find out if a linked-list has an end? (I.e. The list is not a cycle)
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?
Can you use the function fprintf() to display the output on the screen?
What is the use of string in c++?
Differentiate between an external iterator and an internal iterator?
How would you use the functions memcpy(), memset(), memmove()?
What is friend class in c++ with example?
Mention the purpose of istream class?
What is prototype for that c string function?