write program for palindrome

Answer Posted / hillol bhattacharya

#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(m==n)
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


Please Help Members By Posting Answers For Below Questions

Is it possible to have a recursive inline function in c++?

549


What is a .lib file in c++?

564


What is the role of static keyword for a class member variable?

627


Must accepts "Maestro Cards" Tax for bike should be less than 15 Total number of lanes is more than 10 Must provides monthly pass Write a method: boolean isGoodTollBridge(String[] cardsAccepted, String[] tollTax, boolean hasMonthlyPass, int numberOfLanes); String[] cardsAccepted A String array of names of card types accepted for payment of toll tax, it can be null if the toll does not accept any card String[] tollTax A String array of toll tax chart (say “Train : 300”,”BullCart : 10”) boolean hasMonthlyPass This parameter defines whether there is any monthly pass available or not int numberOfLanes This parameter defines the number of lanes for each side

3044


You run a shell on unix system. How would you tell which shell are you running?

657






declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

1739


Is turbo c++ free?

617


What is a binary file? List the merits and demerits of the binary file usagein C++.

728


Is dev c++ free?

610


Difference between overloaded functions and overridden functions

576


How does class accomplish data hiding in c++?

657


Write a Program to find the largest of 4 no using macros.

578


What is the difference between a pointer and a link in c ++?

561


Why do we need c++?

593


When does the c++ compiler create temporary variables?

564