write a program to display reverse of a number using for
loop?
Answer Posted / jayesh jain
#include<stdio.h>
#include<conio.h>
void main()
{
int num,i;
int rem;
clrscr();
printf("\n enter number");
scanf("%ld",&num);
printf("\n the reverse of number %ld is ",num);
for(i=0;num>0;i++)
{
rem=num%10;
num=num/10;
printf("%d",rem);
}
getch();
}
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
can we implement multi-threads in c.
what will be maximum number of comparisons when number of elements are given?
Array is an lvalue or not?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What is getch() function?
Can we declare a function inside a function in c?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
How do you write a program which produces its own source code as output?
What is the total generic pointer type?
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent
Tell us the use of fflush() function in c language?
What is meant by gets in c?
Are pointers integers in c?
What is "Hungarian Notation"?
Can i use “int” data type to store the value 32768? Why?