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
Write a program to identify if a given binary tree is balanced or not.
What is keyword with example?
What is hungarian notation? Is it worthwhile?
Does c have an equivalent to pascals with statement?
What is scanf () in c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What is double pointer?
How can I discover how many arguments a function was actually called with?
What does the function toupper() do?
Explain what header files do I need in order to define the standard library functions I use?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is a wrapper function in c?
What are the functions to open and close the file in c language?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
What are static variables in c?