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
What is %s and %d in c?
What is difference between stdio h and conio h?
What is the process of writing the null pointer?
How can you allocate arrays or structures bigger than 64K?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
What is structure of c program?
Why doesnt that code work?
How does #define work?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Write a C program in Fibonacci series.
Without Computer networks, Computers will be half the use. Comment.
What is scanf_s in c?
What are the 3 types of structures?
What are integer variable, floating-point variable and character variable?
When would you use a pointer to a function?