write program for palindrome
Answer Posted / surya
#include<stdio.h>
#include<conio.h>
void main()
{
int n,rev=0,r;
clrscr();
printf("enter any no");
scanf("%d",&n);
m=n;
while(n>0)
{
r=n%10;
rev=rev*10+r;
n=n/10;
}
printf("reverse of the number is %d",rev);
}
| Is This Answer Correct ? | 14 Yes | 19 No |
Post New Answer View All Answers
Write a function that swaps the values of two integers, using int* as the argument type?
What is a binary file? List the merits and demerits of the binary file usagein C++.
What is scope in c++ with example?
Difference between declaration and definition of a variable.
Is multimap sorted c++?
What is the real purpose of class – to export data?
What is pointer to member?
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?
What are the steps in the development cycle?
Is there any function that can skip certain number of characters present in the input stream?
Which one is better- macro or function?
How do you declare a set in c++?
Is empty stack c++?
Who was the creator of c++?
Define a nested class.