write a program to display reverse of a number using for
loop?
Answer Posted / vikas kumar from agra
#include<stdio.h>
#include<conio.h>
void main()
{
long int num,i;
int d;
clrscr();
printf("\n enter number");
scanf("%ld",&n);
printf("\n the reverse of number %ld is ",num);
for(i=0;i>0;i=i\10)
{
d=i%10;
printf("%d",d);
}
getch();
}
| Is This Answer Correct ? | 39 Yes | 83 No |
Post New Answer View All Answers
How can you be sure that a program follows the ANSI C standard?
Explain how do you declare an array that will hold more than 64kb of data?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
What is the use of getchar functions?
using only #include
What is the difference between abs() and fabs() functions?
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
What is the size of enum in c?
Why is #define used?
Explain what are run-time errors?
Which one would you prefer - a macro or a function?
Explain Function Pointer?
simple program of graphics and their output display
What is difference between structure and union in c programming?
What is structure and union in c?