write program for palindrome
Answer Posted / varun tiwari
#include<stdio.h>
#include<conio.h>
void main()
{
int n,s=0,m,r;
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)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is setbase c++?
How can we access protected and private members of a class?
What is the difference between while and do while loop? Explain with examples.
Is arr and &arr are same expression for an array?
State the difference between pre and post increment/decrement operations.
Can we delete this pointer in c++?
How to defines the function in c++?
Which programming language should I learn first?
Explain what you mean by a pointer.
What is format for defining a structure?
What can I safely assume about the initial values of variables which are not explicitly initialized?
What does obj stand for?
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
Explain the purpose of the keyword volatile.
What is the use of bit fields in structure declaration?