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
regarding pointers concept
What is use of bit field?
Here is a good puzzle: how do you write a program which produces its own source code as output?
What are different storage class specifiers in c?
Is stack a keyword in c?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
Why is this loop always executing once?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
What are identifiers c?
Explain b+ tree?
What's the right way to use errno?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
what do you mean by enumeration constant?