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


Please Help Members By Posting Answers For Below Questions

Explain why c is faster than c++?

676


Explain how do you declare an array that will hold more than 64kb of data?

1025


What is a shell structure examples?

688


.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; }

2140


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

732






What are actual arguments?

737


Write a program of prime number using recursion.

709


What is string function in c?

621


How many bytes are occupied by near, far and huge pointers (dos)?

792


Explain how do you search data in a data file using random access method?

779


What are the general description for loop statement and available loop types in c?

786


What is typedf?

752


Do you know null pointer?

694


Define Spanning-Tree Protocol (STP)

752


How many types of functions are there in c?

677