to find out the reverse digit of a given number
Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
int n,a;
printf("enter the number to be reversed :");
scanf("%d",&n);
printf("the reversed number is :");
for(int i=0;n>0;i++)
{
a=n%10;
n=n/10;
printf("%d",a);
}
getch();
}
| Is This Answer Correct ? | 74 Yes | 37 No |
Post New Answer View All Answers
What is register variable in c language?
What is scope rule of function in c?
What is strcpy() function?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
What are identifiers and keywords in c?
What is calloc() function?
How can you avoid including a header more than once?
What are the types of c language?
How do you view the path?
How to define structures? ·
What is a constant and types of constants in c?
Explain how do you override a defined macro?
What is wrong with this program statement?
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is const and volatile in c?