write a program to display reverse of a number using for
loop?
Answer Posted / narendra
It is simple.use this and it works
#include <stdio.h>
#include <conio.h>
int main()
{
int rem,num;
clrscr();
printf("Enter the number\n");
scanf("%d",&num);
for (num= num; num > 0; num = num/10)
{
rem = num % 10;
printf("%d",rem);
}
return 0;
}
Is This Answer Correct ? | 14 Yes | 11 No |
Post New Answer View All Answers
What are the general description for loop statement and available loop types in c?
How can I handle floating-point exceptions gracefully?
Why is c faster?
What is the condition that is applied with ?: Operator?
What are pointers? Why are they used?
Write a program to swap two numbers without using a temporary variable?
What is the significance of c program algorithms?
What is the use of function overloading in C?
What is the use of a ‘ ’ character?
Is c language still used?
Can one function call another?
What is a buffer in c?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
What is the use of structure padding in c?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?