how to find out the reverse number of a digit if it is
input through the keyboard?

Answer Posted / amrit

int main()
{
int a = 5678;
int temp=0,rev;

while((a%10)!=0)
{
rev =a%10;
a=a/10;
temp= temp*10+ rev;
}
return 0;
}

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how can I remove the trailing spaces from a string?

621


What is structure padding in c?

616


What is quick sort in c?

577


writ a program to compare using strcmp VIVA and viva with its output.

1512


What is memcpy() function?

615






Define and explain about ! Operator?

609


What is c language used for?

551


Explain how can I make sure that my program is the only one accessing a file?

614


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

687


Explain how can I convert a number to a string?

636


What are # preprocessor operator in c?

622


What are the storage classes in C?

616


What are the differences between Structures and Arrays?

599


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

754


Differentiate between Macro and ordinary definition.

718