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
What is wrong in this statement? scanf(ā%dā,whatnumber);
What is the use of header?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
Tell me can the size of an array be declared at runtime?
please give me some tips for the placement in the TCS.
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What is the difference between constant pointer and constant variable?
What is this infamous null pointer, anyway?
What is an operator?
which type of aspect you want from the student.
When can a far pointer be used?
What is the difference between abs() and fabs() functions?
What are multibyte characters?
Which is better pointer or array?
When should volatile modifier be used?