write a program to display reverse of a number using for
loop?

Answer Posted / vinit kumar rai

#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 ?    10 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

723


What is the use of header?

619


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2264


Tell me can the size of an array be declared at runtime?

595


please give me some tips for the placement in the TCS.

1629






how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

648


What is the difference between constant pointer and constant variable?

744


What is this infamous null pointer, anyway?

608


What is an operator?

656


which type of aspect you want from the student.

1701


When can a far pointer be used?

586


What is the difference between abs() and fabs() functions?

601


What are multibyte characters?

642


Which is better pointer or array?

597


When should volatile modifier be used?

554