write a program to display reverse of a number using for
loop?
Answer Posted / k.ashok kumar
BETTER CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
int a;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&a);
printf("\n Reverse number of %d is : ",a);
while(a)
{
printf("%d",a%10);
a/=10;
}
getch();
}
| Is This Answer Correct ? | 6 Yes | 8 No |
Post New Answer View All Answers
What is the condition that is applied with ?: Operator?
Is boolean a datatype in c?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
What are the benefits of organizational structure?
What is the hardest programming language?
What does %2f mean in c?
What does the c preprocessor do?
What is c language & why it is used?
Where static variables are stored in memory in c?
What is the use of pointers in C?
formula to convert 2500mmh2o into m3/hr
How many bytes is a struct in c?
write a program to print largest number of each row of a 2D array
Can 'this' pointer by used in the constructor?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....