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
What are the similarities between c and c++?
What tq means in chat?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
Write a program to check whether a number is prime or not using c?
Explain what are multidimensional arrays?
If null and 0 are equivalent as null pointer constants, which should I use?
Explain what are global variables and explain how do you declare them?
What is c standard library?
How variables are declared in c?
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What is array in c with example?
Stimulate calculator using Switch-case-default statement for two numbers
What is the difference between local variable and global variable in c?
What is the best organizational structure?