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 'bus error'?
Write a program for finding factorial of a number.
How do you print an address?
Explain modulus operator. What are the restrictions of a modulus operator?
can anyone please tell about the nested interrupts?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
What are the advantages of Macro over function?
Explain what are compound statements?
What is getch () for?
How can a program be made to print the name of a source file where an error occurs?
Explain the term printf() and scanf() used in c language?
Define circular linked list.
What does %d do?
What is const and volatile in c?