write a program to display reverse of a number using for
loop?
Answer Posted / radhika
#include <stdio.h>
int main(void) {
int num[4], i;
printf("Enter the number :
");
printf("The reverse number is :
");
for(i = 4;i >= 0; i--) {
printf("%d",i);
printf("
");
}
return 0;
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is string length in c?
Why c is procedure oriented?
How many types of functions are there in c?
Is c is a high level language?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
What is typedf?
Write a Program to accept different goods with the number, price and date of purchase and display them
What is s in c?
Explain what are preprocessor directives?
What is class and object in c?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
When I set a float variable to, say, 3.1, why is printf printing it as 3.0999999?
How do I send escape sequences to control a terminal or other device?
Which is best linux os?