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


Please Help Members By Posting Answers For Below Questions

What are the advantages of c preprocessor?

700


Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above

652


can anyone suggest some site name..where i can get some good data structure puzzles???

1639


What is an example of structure?

581


Differentiate between a structure and a union.

756






What are conditional operators in C?

616


C language questions for civil engineering

1233


What is floating point constants?

678


How does #define work?

638


What is an expression?

650


Explain modulus operator.

588


What is the role of this pointer?

540


How can I implement sets or arrays of bits?

596


What is #include cctype?

570


How will you write a code for accessing the length of an array without assigning it to another variable?

611