write a program to display reverse of a number using for
loop?
Answer Posted / narendra
It is simple.use this and it works
#include <stdio.h>
#include <conio.h>
int main()
{
int rem,num;
clrscr();
printf("Enter the number\n");
scanf("%d",&num);
for (num= num; num > 0; num = num/10)
{
rem = num % 10;
printf("%d",rem);
}
return 0;
}
| Is This Answer Correct ? | 14 Yes | 11 No |
Post New Answer View All Answers
How do you print only part of a string?
Who is the founder of c language?
How can I handle floating-point exceptions gracefully?
How can you be sure that a program follows the ANSI C standard?
Do string constants represent numerical values?
What does void main return?
What is cohesion in c?
What does a function declared as pascal do differently?
Difference between linking and loading?
What is #line?
How can this be legal c?
Explain the difference between ++u and u++?
How can a number be converted to a string?
find out largest elemant of diagonalmatrix
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..