write program for palindrome
Answer Posted / jamai partha
#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==n)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What header file is needed for exit(); a) stdlib.h b) conio.h c) dos.h
Can the creation of operator** is allowed to perform the to-the-power-of operations?
What do you mean by persistent and non persistent objects?
What is the difference between an array and a list?
What is #include cstdlib in c++?
What is constructor and destructor in c++?
Define a pdb file.
Where the memory to the static variables is allocated?
State the difference between pre and post increment/decrement operations.
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
Why do we use templates?
How does the copy constructor differ from the assignment operator (=)?
What is the last index number in an array of 100 characters a) 100 b) 99 c) 101
Why do we use string in c++?
Explain the concept of memory leak?