to find out the reverse digit of a given number
Answer Posted / vishnu
#include<stdio.h>
#include<conio.h>
void main()
{
int r,num,sum=0;
clrscr();
printf("Enter any Digit \n");
scanf("%d", &num);
while(num!=0)
{
r=num%10;
sum=sum*10+r;
num=num/10;
}
printf("Reverse Digit of a given number = %d",sum);
getch();
}
| Is This Answer Correct ? | 66 Yes | 26 No |
Post New Answer View All Answers
What is assert and when would I use it?
What is a global variable in c?
What are the keywords in c?
What is malloc() function?
Explain what is wrong with this program statement?
please give me some tips for the placement in the TCS.
Why is not a pointer null after calling free?
What is the difference between far and near ?
number of times a digit is present in a number
What are the different types of C instructions?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
How are Structure passing and returning implemented by the complier?
What is the hardest programming language?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Write a program to print ASCII code for a given digit.