write a program to display reverse of a number using for
loop?
Answer Posted / ganagdhara c
#include<stdio.h>
#include<conio.h>
void main()
{
long int num,i;
int d;
clrscr();
printf("\n enter number");
scanf("%ld",&num);
printf("\n the reverse of number %ld is ",num);
for(i=0;num>0;i++)
{
d=num%10;
num=num/10;
printf("%d",d);
}
getch();
}
| Is This Answer Correct ? | 22 Yes | 17 No |
Post New Answer View All Answers
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
Write a program to know whether the input number is an armstrong number.
What does 4d mean in c?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
What is use of #include in c?
What are header files why are they important?
What is ambagious result in C? explain with an example.
What is the use of ?: Operator?
How is a null pointer different from a dangling pointer?
Write a C program in Fibonacci series.
Explain what is meant by 'bit masking'?
Explain the red-black trees?
What is the best style for code layout in c?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset
What is include directive in c?