write a program to display reverse of a number using for
loop?
Answer Posted / vikas kumar from agra
#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 ? | 39 Yes | 83 No |
Post New Answer View All Answers
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.
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
Differentiate between a structure and a union.
Why should I use standard library functions instead of writing my own?
How many levels of pointers have?
What is the purpose of main() function?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Where are c variables stored in memory?
how can f be used for both float and double arguments in printf? Are not they different types?
Why doesnt this code work?
What is the difference between procedural and declarative language?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
Differentiate call by value and call by reference?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
Which programming language is best for getting job 2020?