how to find out the reverse number of a digit if it is
input through the keyboard?
Answer Posted / sneha
main( )
{
int x,result,next;
printf("Enter The number to revers=");
scanf("%d",&x);
//5th
result=x%10;
result=result*10;
//4th
next=(x/10)%10;
result=(result+next)*10;
//3rd
next=(x/100)%10;
result=(result+next)*10;
//2nd
next=(x/1000)%10;
result=(result+next)*10;
//1st
next=(x/10000)%10;
result=result+next;
printf("%d",result);
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is void main () in c?
What is %d called in c?
Is a pointer a kind of array?
Why is a semicolon (;) put at the end of every program statement?
Explain Basic concepts of C language?
What is meant by int main ()?
Write a program to find the biggest number of three numbers in c?
What is the difference between scanf and fscanf?
Do you know what are bitwise shift operators in c programming?
How to create struct variables?
When should you use a type cast?
Why do we use static in c?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
What does int main () mean?
Can we assign integer value to char in c?