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 are extern variables in c?
What are the features of the c language?
What is the difference between pure virtual function and virtual function?
What does %p mean?
What is new line escape sequence?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
What is a scope resolution operator in c?
Find MAXIMUM of three distinct integers using a single C statement
What are the disadvantages of a shell structure?
Write a code to generate divisors of an integer?
What is structure in c definition?
What is the function of this pointer?
What is a wrapper function in c?
What is an auto keyword in c?
Can we compile a program without main() function?