write a program to display reverse of a number using for
loop?

Answer Posted / rajesh.k

int main()
{
int num, i;
printf("Enter the number :\n");
scanf("%d",&num);
printf("The reverse number is :\n");
for(i = num;i >= 0; i--) {
printf("%d",i);
printf("\n");
}
getch();
}

Is This Answer Correct ?    20 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a constant and types of constants in c?

594


How do I determine whether a character is numeric, alphabetic, and so on?

615


What is the difference between the = symbol and == symbol?

616


how is the examination pattern?

1587


Why is sizeof () an operator and not a function?

568






What are the disadvantages of external storage class?

582


What are the features of c languages?

618


What is the purpose of clrscr () printf () and getch ()?

589


What are the different types of data structures in c?

592


How a string is stored in c?

575


Explain c preprocessor?

673


How do you write a program which produces its own source code as output?

599


Why static variable is used in c?

546


Why does everyone say not to use scanf? What should I use instead?

676


Explain Function Pointer?

675