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


Please Help Members By Posting Answers For Below Questions

What are the similarities between c and c++?

600


What tq means in chat?

582


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

2797


Write a program to check whether a number is prime or not using c?

576


Explain what are multidimensional arrays?

603






If null and 0 are equivalent as null pointer constants, which should I use?

577


Explain what are global variables and explain how do you declare them?

639


What is c standard library?

692


How variables are declared in c?

571


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

766


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2303


What is array in c with example?

615


Stimulate calculator using Switch-case-default statement for two numbers

2448


What is the difference between local variable and global variable in c?

691


What is the best organizational structure?

644