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

Differentiate between calloc and malloc.

754


What is the use of header files?

604


What is the use of a ‘’ character?

586


How is actual parameter different from the formal parameter?

590


Explain the use of fflush() function?

626






any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

657


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4179


What are the application of c?

646


Why is c called c not d or e?

610


Is main is a keyword in c?

606


Can a void pointer point to a function?

568


The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none

708


What is the c language function prototype?

644


What is formal argument?

648


Why is c so important?

594