write program for palindrome
Answer Posted / krishna reddy
#include<stdio.h>
#include<conio.h>
void main()
{
int n,m,s,reverse=0;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n!=0)
{
s=n%10;
reverse=reverse*10+s;
n=n/10;
}
if(m==reverse)
printf("the no is palindrome");
else
printf("no is not palindrome");
getch();
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Write a Program for read a line from file from location N1 to N2 using command line arguments. Eg:exe 10 20 a.c
Does c++ vector allocate memory?
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
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
Ask to write virtual base class code?
What is a character in c++?
Is c++ faster than c?
Explain linear search.
Difference between pointer to constant and constant pointer to a constant. Give example.
What are multiple inheritances (virtual inheritance)? What are its advantages and disadvantages?
What is dev c++ used for?
How do I use turbo c++?
What are built-in functions? What is the syntax for the definition?
How do you compile the source code with your compiler?
What are the advantages of c++? Explain