to find out the reverse digit of a given number
Answer Posted / jet lee
#include<stdio.h>
int rev(int y);
int main()
{
int x;
printf("\n please enter the number:\n");
scanf("%d",&x);
rev(x);
return 0;
}
int rev(int y)
{
int i;
do
{
i=(y%10);
printf("%d",i);
y=(y/10);
}while(y>0);
}
Is This Answer Correct ? | 17 Yes | 9 No |
Post New Answer View All Answers
What is data type long in c?
What are the restrictions of a modulus operator?
What is array within structure?
What are the usage of pointer in c?
What is the difference between declaring a variable and defining a variable?
how many errors in c explain deply
How to declare a variable?
Why is event driven programming or procedural programming, better within specific scenario?
What is local and global variable in c?
code for quick sort?
Is c procedural or functional?
What is the purpose of main( ) in c language?
What are pointers? What are different types of pointers?
What is the difference between printf and scanf )?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.