Write a program in C to reverse a number by recursive
function?
Answer / sreejesh1987
int rev(int,int);
void main()
{
int a,b;
clrscr();
printf("\nEnter the number to reverse:");//456
scanf("%d",&a);
b=a%10;//b=6
printf("\nReverse of the number is: %d",rev(a,b));
getch();
}
int rev(int a,int b)
{
if(a>10)//456
{
a=a/10;//a=45
b=b*10+a%10;//65
return rev(a,b);
}
else
return b;
}
| Is This Answer Correct ? | 17 Yes | 7 No |
what type of errors are checked during compilation
plz answer..... a program that reads non-negative integer and computes and prints its factorial
Is file a keyword in c?
Does c have an equivalent to pascals with statement?
Which is an example of a structural homology?
what is the difference between malloc() and calloc() function?
write a program for 4 4 3 3 3 3 2 2 2 2 2 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 4 4
#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.
How do you list a file’s date and time?
Is it valid to address one element beyond the end of an array?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
WRITE A C PROGRAM TO FIND SECOND BIGGEST VALUE FROM THE GIVEN VALUES