wtite a program that will multiply two integers in recursion
function
Answer Posted / mohit taneja
int mul(int n)
{
static int num;
printf("enter the number");
scanf("%d",&num);
if(n==1)
{
return num;
}
else
{
num=num*mul(n-1);
}
return num;
}
void main()
{
int n,result;
printf("enter the number of digit u want to multiply");
scanf("%d",&n);
int result=mul(n);
printf("multiplication=%d",result);
getch();
}
| Is This Answer Correct ? | 13 Yes | 22 No |
Post New Answer View All Answers
What are the preprocessor categories?
What is a program flowchart and how does it help in writing a program?
What is a method in c?
Differentiate between a structure and a union.
Give the rules for variable declaration?
What is string function c?
What is c value paradox explain?
write a progrmm in c language take user interface generate table using for loop?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
what are enumerations in C
Explain what standard functions are available to manipulate strings?
How do we make a global variable accessible across files? Explain the extern keyword?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
Can we declare variables anywhere in c?
Why c is procedure oriented?