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
How to establish connection with oracle database software from c language?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
What is the purpose of type declarations?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
What are the disadvantages of c language?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
What language is windows 1.0 written?
Differentiate between null and void pointers.
Is there anything like an ifdef for typedefs?
Discuss the function of conditional operator, size of operator and comma operator with examples.
Why is it usually a bad idea to use gets()? Suggest a workaround.
What's the best way of making my program efficient?