write program for palindrome
Answer Posted / uday
#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 ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain binary search.
Is c better than c++?
Implement stack operations with pointers with appropriate exception checks.
What's the most powerful programming language?
What are the new features that iso/ansi c++ has added to original c++ specifications?
State the difference between delete and delete[].
What are the various access specifiers in c++?
What is buffering in c++?
Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.
Why ctype h is used in c++?
What are the classes in c++?
What are the advantages of c++? Explain
Do inline functions improve performance?
What is a singleton class c++?
What are the 2 main types of data structures?