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
Subtract Two Number Without Using Subtraction Operator
Why doesnt this code work?
What is getch () for?
What is call by reference in functions?
Which of these functions is safer to use : fgets(), gets()? Why?
What is difference between %d and %i in c?
Why flag is used in c?
write a program to display all prime numbers
How can I sort more data than will fit in memory?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
I have a varargs function which accepts a float parameter?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
Is it possible to have a function as a parameter in another function?
What are the different types of control structures?
What is the use of c language in real life?