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 do you determine whether to use a stream function or a low-level function?
What is ## preprocessor operator in c?
Write a program to swap two numbers without using a temporary variable?
how to count no of words,characters,lines in a paragraph.
How can I ensure that integer arithmetic doesnt overflow?
writ a program to compare using strcmp VIVA and viva with its output.
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
How many levels deep can include files be nested?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Does free set pointer to null?
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
Write a program of advanced Fibonacci series.
What is derived datatype in c?
What is s in c?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.