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
Explain why c is faster than c++?
Explain how do you declare an array that will hold more than 64kb of data?
What is a shell structure examples?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none
What are actual arguments?
Write a program of prime number using recursion.
What is string function in c?
How many bytes are occupied by near, far and huge pointers (dos)?
Explain how do you search data in a data file using random access method?
What are the general description for loop statement and available loop types in c?
What is typedf?
Do you know null pointer?
Define Spanning-Tree Protocol (STP)
How many types of functions are there in c?