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
Differentiate between calloc and malloc.
What is the use of header files?
What is the use of a ‘ ’ character?
How is actual parameter different from the formal parameter?
Explain the use of fflush() function?
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
Write a c program to build a heap method using Pointer to function and pointer to structure ?
What are the application of c?
Why is c called c not d or e?
Is main is a keyword in c?
Can a void pointer point to a function?
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
What is the c language function prototype?
What is formal argument?
Why is c so important?