Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Tell us the use of fflush() function in c language?

1157


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1092


When would you use a pointer to a function?

1055


Suggesting that there can be 62 seconds in a minute?

1049


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

1953


Why double pointer is used in c?

1047


Why is it important to memset a variable, immediately after allocating memory to it ?

2081


What are pointers? What are stacks and queues?

1158


How do we make a global variable accessible across files? Explain the extern keyword?

1885


What is the use of gets and puts?

1036


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2884


Explain what are multibyte characters?

1205


Is c procedural or object oriented?

1029


Explain enumerated types.

1044


Why doesnt that code work?

1189