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


Please Help Members By Posting Answers For Below Questions

How do you determine whether to use a stream function or a low-level function?

647


What is ## preprocessor operator in c?

611


Write a program to swap two numbers without using a temporary variable?

605


how to count no of words,characters,lines in a paragraph.

3901


How can I ensure that integer arithmetic doesnt overflow?

606






writ a program to compare using strcmp VIVA and viva with its output.

1521


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1438


How many levels deep can include files be nested?

649


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

15499


Does free set pointer to null?

559


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?

599


Write a program of advanced Fibonacci series.

706


What is derived datatype in c?

629


What is s in c?

613


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.

1739