write a program to display reverse of a number using for
loop?
Answer Posted / vinit kumar rai
#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 ? | 10 Yes | 13 No |
Post New Answer View All Answers
how can I convert a string to a number?
What is static volatile in c?
What is the symbol indicated the c-preprocessor?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
Write a code to generate a series where the next element is the sum of last k terms.
Can you please explain the scope of static variables?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
Why header file is used in c?
What is echo in c programming?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
What is a global variable in c?
Are the expressions * ptr ++ and ++ * ptr same?
What is bin sh c?
What is a method in c?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?