write a program to display reverse of a number using for
loop?
Answer Posted / rakesh ranjan
#include<conio.h>
#include<stdio.h>
main()
{
int x,n,i;
printf("entre the number");
scanf("%d",&n);
for(;n>0;)
{
x=n%10;
printf("%d",x);
n/=10;
}
getch();
}
| Is This Answer Correct ? | 15 Yes | 9 No |
Post New Answer View All Answers
What is the difference between declaring a variable and defining a variable?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
List a few unconditional control statement in c.
What is New modifiers?
Give basis knowledge of web designing ...
What is the correct code to have following output in c using nested for loop?
How can I write a function that takes a format string and a variable number of arguments?
When should you not use a type cast?
write a program to create a sparse matrix using dynamic memory allocation.
Write a program to reverse a string.
What is the auto keyword good for?
Explain c preprocessor?
Find MAXIMUM of three distinct integers using a single C statement
What is ambagious result in C? explain with an example.
What is the use of getchar() function?